Skip to content

Commit 98591fc

Browse files
committed
various files
1 parent a4e1a37 commit 98591fc

File tree

5 files changed

+235
-22
lines changed

5 files changed

+235
-22
lines changed

ddx.sh

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
#!/bin/bash
2+
3+
set -aeu -o pipefail
4+
5+
# --------------------------------------------------------------
6+
# Ce script écrit une image disque sur une carte SD (ou autre).
7+
#
8+
# Usage: ddx <device> <image>
9+
#
10+
# <device> Nom du fichier 'block-device' de la carte SD insérée
11+
# (ex: '/dev/sdb')
12+
# <image> Nom du fichier image à inscrire
13+
# (ex: 'raspbian.bin')
14+
#
15+
# Note: Le script doit être lancé par 'sudo'
16+
# --------------------------------------------------------------
17+
18+
SAVED_DIR=$PWD
19+
20+
# Il faut être SU
21+
CHECK_SU=`id | grep "uid=0(root)" | wc -l || true`
22+
23+
if [ "$CHECK_SU" != "1" ] ; then
24+
echo ""
25+
echo "You MUST be SU. Aborting."
26+
echo ""
27+
exit -10
28+
fi
29+
30+
# On attend deux arguments
31+
if [ $# -ne 2 ] ; then
32+
echo ""
33+
echo "Usage: $0 <device> <image>"
34+
echo ""
35+
echo "Example:"
36+
echo "$0 /dev/sdb image.bin"
37+
echo ""
38+
exit -1
39+
fi
40+
41+
# $1 : Est-ce un nom de fichier?
42+
if [ ! -b "$1" ] ; then
43+
echo ""
44+
echo "$1"
45+
echo "Huh? This is NOT a (device) file! Aborting."
46+
echo ""
47+
exit -2
48+
else
49+
DEV=$1
50+
fi
51+
52+
# $1 : Est-ce un block-device de disque?
53+
DEV_IN_LSBLK_PD=`lsblk -pd | grep disk | grep $1 | wc -l || true`
54+
55+
if [ "$DEV_IN_LSBLK_PD" != "1" ] ; then
56+
echo ""
57+
echo "$1"
58+
echo "Huh? This device is NOT a disk block-device! Aborting."
59+
echo ""
60+
exit -3
61+
fi
62+
63+
# $1 : Est-il monté?
64+
DEV_IN_MOUNTS=`mount | grep $1 | wc -l || true`
65+
66+
if [ "$DEV_IN_MOUNTS" != "0" ] ; then
67+
echo ""
68+
echo "$1"
69+
echo "This device MUST NOT be mounted! Aborting."
70+
echo ""
71+
exit -4
72+
else
73+
OUTPUT_DEV=$1
74+
echo "OK."
75+
fi
76+
77+
# $2 : Est-ce un nom de fichier?
78+
if [ ! -f "$2" ] ; then
79+
echo ""
80+
echo "$2"
81+
echo "Huh? This is NOT a file! Aborting."
82+
echo ""
83+
exit -5
84+
else
85+
IN=$2
86+
fi
87+
88+
INPUT_FILE=$IN
89+
90+
echo ""
91+
echo "Going to WRITE '$INPUT_FILE' to '$OUTPUT_DEV'. Is it correct? (Y/N)"
92+
read RESP
93+
94+
if [ "$RESP" == "Y" -o "$RESP" == "y" ] ; then
95+
echo ""
96+
echo "----------------------------------"
97+
echo " WRITING "
98+
echo "----------------------------------"
99+
echo ""
100+
101+
(pv -n $INPUT_FILE | dd of=$OUTPUT_DEV bs=64M oflag=dsync) 2>&1 | dialog --gauge "Running dd ..." 10 70 0
102+
103+
echo "Sync'ing.)"
104+
sync
105+
fi
106+
107+
cd $SAVED_DIR
108+
109+
echo "FINISHED."
110+

dzo.sh

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/bash
2+
3+
set -aeu -o pipefail
4+
5+
# --------------------------------------------------------------
6+
# Ce script efface une carte SD (ou autre).
7+
#
8+
# Usage: dzo <device>
9+
#
10+
# <device> Nom du fichier 'block-device' de la carte SD insérée
11+
# (ex: '/dev/sdb')
12+
#
13+
# Note: Le script doit être lancé par 'sudo'
14+
# --------------------------------------------------------------
15+
16+
SAVED_DIR=$PWD
17+
18+
# Il faut être SU
19+
CHECK_SU=`id | grep "uid=0(root)" | wc -l || true`
20+
21+
if [ "$CHECK_SU" != "1" ] ; then
22+
echo ""
23+
echo "You MUST be SU. Aborting."
24+
echo ""
25+
exit -10
26+
fi
27+
28+
# On attend un argument
29+
if [ $# -ne 1 ] ; then
30+
echo ""
31+
echo "Usage: $0 <device>"
32+
echo ""
33+
echo "Example:"
34+
echo "$0 /dev/sdb"
35+
echo ""
36+
exit -1
37+
fi
38+
39+
# $1 : Est-ce un nom de fichier?
40+
if [ ! -b "$1" ] ; then
41+
echo ""
42+
echo "$1"
43+
echo "Huh? This is NOT a (device) file! Aborting."
44+
echo ""
45+
exit -2
46+
else
47+
DEV=$1
48+
fi
49+
50+
# $1 : Est-ce un block-device de disque?
51+
DEV_IN_LSBLK_PD=`lsblk -pd | grep disk | grep $1 | wc -l || true`
52+
53+
if [ "$DEV_IN_LSBLK_PD" != "1" ] ; then
54+
echo ""
55+
echo "$1"
56+
echo "Huh? This device is NOT a disk block-device! Aborting."
57+
echo ""
58+
exit -3
59+
fi
60+
61+
# $1 : Est-il monté?
62+
DEV_IN_MOUNTS=`mount | grep $1 | wc -l || true`
63+
64+
if [ "$DEV_IN_MOUNTS" != "0" ] ; then
65+
echo ""
66+
echo "$1"
67+
echo "This device MUST NOT be mounted! Aborting."
68+
echo ""
69+
exit -4
70+
else
71+
OUTPUT_DEV=$1
72+
echo "OK."
73+
fi
74+
75+
INPUT_FILE="/dev/zero"
76+
77+
OUTPUT_SIZE=`blockdev --getsize64 $OUTPUT_DEV`
78+
79+
echo ""
80+
echo "Going to ERASE '$OUTPUT_DEV'. Is it correct? (Y/N)"
81+
read RESP
82+
83+
if [ "$RESP" == "Y" -o "$RESP" == "y" ] ; then
84+
echo ""
85+
echo "----------------------------------"
86+
echo " ERASING "
87+
echo "----------------------------------"
88+
echo ""
89+
90+
(pv -s $OUTPUT_SIZE -n $INPUT_FILE | dd of=$OUTPUT_DEV bs=64M oflag=dsync) 2>&1 | dialog --gauge "Running dd ..." 10 70 0
91+
92+
echo "Sync'ing.)"
93+
sync
94+
fi
95+
96+
cd $SAVED_DIR
97+
98+
echo "FINISHED."
99+

install-chrome.sh

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sudo sh -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list'
2+
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
3+
sudo apt-get update
4+
sudo apt-get install google-chrome-stable

install-vscode.sh

100644100755
File mode changed.

linux-dev-host.sh

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
# System-wide APT package update
2-
sudo apt-get update
3-
sudo apt-get full-upgrade
2+
sudo apt update
3+
sudo apt full-upgrade
44

55
# Specific packages for virtualized platforms
6-
sudo apt-get install open-vm-tools open-vm-tools-desktop
6+
sudo apt install open-vm-tools open-vm-tools-desktop
77

88
# C/C++ base packages
9-
sudo apt-get install build-essential gdb cmake clazy cppcheck csstidy tidy weblint-perl valgrind kcachegrind htop linux-tools-common
9+
sudo apt install build-essential gdb cmake ninja-build clazy cppcheck valgrind kcachegrind htop linux-tools-common
10+
11+
# Qt tooling
12+
sudo apt install qtcreator gammaray gammaray-plugin-positioning gammaray-plugin-bluetooth gammaray-plugin-quickinspector gammaray-plugin-waylandinspector clazy
13+
14+
# Web tooling
15+
sudo apt csstidy tidy weblint-perl
1016

1117
# CLI tooling
12-
sudo apt-get install sysvbanner cowsay terminator terminology cool-retro-term konsole
13-
sudo apt-get install tree pv dialog wget curl jq p7zip-full unzip cpio xz-utils rsync nano
18+
sudo apt install sysvbanner cowsay terminator terminology cool-retro-term konsole kitty fzf tree pv dialog wget curl jq p7zip-full unzip cpio xz-utils rsync nano vim sudo
1419

1520
# System and networking tools
16-
sudo apt-get install snapd apt-utils diffstat chrpath socat locales debianutils findutils file time fontconfig strace lsof iputils-ping net-tools traceroute iperf
21+
sudo apt install apt-utils diffstat chrpath socat locales debianutils findutils file time strace ltrace lsof iputils-ping net-tools traceroute iperf smbclient libssl-dev
1722

1823
# Docker base packages
19-
sudo apt-get install docker docker-compose
24+
sudo apt install docker docker-compose
2025

2126
# GIT tooling
22-
sudo apt-get install git git-lfs gitk git-gui git-cola qgit
27+
sudo apt install git git-lfs gitk git-gui git-cola
2328

2429
# Various productivity tools
25-
sudo apt-get install gparted inkscape gimp krita digikam gthumb thunar
30+
sudo apt install gparted inkscape gimp krita digikam darktable gthumb shotwell gwenview thunar dia libreoffice
2631

2732
# IDE and editors
28-
sudo apt-get install kdevelop qtcreator meld kate gedit
33+
sudo apt install kdevelop qtcreator meld kate gedit
2934

3035
# Python base packages
31-
sudo apt-get install python3 python3-pip python3-venv python3-bs4 python3-serial python3-mysql.connector python3-mysqldb
32-
33-
# Specific libs and runtimes
34-
sudo apt-get install pyqt5-dev nodejs npm sqlite3 rrdtool
36+
sudo apt install python3 python3-venv
3537

36-
# Specific Python packages reclaimed using PIP
37-
sudo -H python3 -m pip install pip --upgrade
38-
sudo -H python3 -m pip install setuptools --upgrade
38+
# Interesting libs and runtimes
39+
sudo apt install sqlite3 libsqlite3-dev rrdtool librrd-dev
3940

40-
# Specific packages reclaimed using SNAP
41-
sudo snap install gitkraken
42-
sudo snap install code
43-
sudo snap install pycharm-community
41+
# Interesting Python packages to install in virtual env
42+
python3 -m pip install pip --upgrade
43+
pip3 install setuptools black pylint mypy pywal bs4 serial mysql.connector --upgrade

0 commit comments

Comments
 (0)