From 60d3abc6ecdc21b4ab921d34a55b4af48690f55a Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 11 Mar 2021 18:53:14 +0100 Subject: Rewrote the whole website to get rid on a heavy theme --- content/en/blog/commands/_index.md | 5 --- content/en/blog/commands/asterisk-call-you.md | 11 ------ .../en/blog/commands/asterisk-list-active-calls.md | 14 -------- content/en/blog/commands/busybox-web-server.md | 13 ------- content/en/blog/commands/capture-desktop-video.md | 13 ------- content/en/blog/commands/clean-conntrack-states.md | 17 --------- content/en/blog/commands/date.md | 14 -------- content/en/blog/commands/dmidecode.md | 20 ----------- content/en/blog/commands/find-hardlinks.md | 12 ------- content/en/blog/commands/find-inodes-used.md | 12 ------- content/en/blog/commands/git-import-commits.md | 13 ------- .../en/blog/commands/git-rewrite-commit-history.md | 13 ------- content/en/blog/commands/ipmi.md | 19 ---------- content/en/blog/commands/mdadm.md | 42 ---------------------- content/en/blog/commands/megacli.md | 11 ------ content/en/blog/commands/omreport.md | 20 ----------- content/en/blog/commands/qemu-nbd.md | 17 --------- content/en/blog/commands/qemu.md | 31 ---------------- content/en/blog/commands/rrdtool.md | 21 ----------- 19 files changed, 318 deletions(-) delete mode 100644 content/en/blog/commands/_index.md delete mode 100644 content/en/blog/commands/asterisk-call-you.md delete mode 100644 content/en/blog/commands/asterisk-list-active-calls.md delete mode 100644 content/en/blog/commands/busybox-web-server.md delete mode 100644 content/en/blog/commands/capture-desktop-video.md delete mode 100644 content/en/blog/commands/clean-conntrack-states.md delete mode 100644 content/en/blog/commands/date.md delete mode 100644 content/en/blog/commands/dmidecode.md delete mode 100644 content/en/blog/commands/find-hardlinks.md delete mode 100644 content/en/blog/commands/find-inodes-used.md delete mode 100644 content/en/blog/commands/git-import-commits.md delete mode 100644 content/en/blog/commands/git-rewrite-commit-history.md delete mode 100644 content/en/blog/commands/ipmi.md delete mode 100644 content/en/blog/commands/mdadm.md delete mode 100644 content/en/blog/commands/megacli.md delete mode 100644 content/en/blog/commands/omreport.md delete mode 100644 content/en/blog/commands/qemu-nbd.md delete mode 100644 content/en/blog/commands/qemu.md delete mode 100644 content/en/blog/commands/rrdtool.md (limited to 'content/en/blog/commands') diff --git a/content/en/blog/commands/_index.md b/content/en/blog/commands/_index.md deleted file mode 100644 index c061e46..0000000 --- a/content/en/blog/commands/_index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Commands" -linkTitle: "Commands" -weight: 40 ---- diff --git a/content/en/blog/commands/asterisk-call-you.md b/content/en/blog/commands/asterisk-call-you.md deleted file mode 100644 index 7dd65f3..0000000 --- a/content/en/blog/commands/asterisk-call-you.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "List active calls on asterisk" -linkTitle: "List active calls on asterisk" -date: 2018-09-25 -description: > - How to show active calls on an asterisk system ---- - -{{< highlight yaml >}} -watch -d -n1 'asterisk -rx “core show channels”' -{{< /highlight >}} diff --git a/content/en/blog/commands/asterisk-list-active-calls.md b/content/en/blog/commands/asterisk-list-active-calls.md deleted file mode 100644 index 73c712e..0000000 --- a/content/en/blog/commands/asterisk-list-active-calls.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "How to have asterisk call you into a meeting" -linkTitle: "How to have asterisk call you into a meeting" -date: 2018-09-25 -description: > - How to have asterisk call you itself into a meeting ---- - -At alterway we sometimes have DTMF problems that prevent my mobile from joining a conference room. Here is something I use to have asterisk call me -and place me inside the room : - -{{< highlight yaml >}} -channel originate SIP/numlog/06XXXXXXXX application MeetMe 85224,M,secret -{{< /highlight >}} diff --git a/content/en/blog/commands/busybox-web-server.md b/content/en/blog/commands/busybox-web-server.md deleted file mode 100644 index 37f9ac6..0000000 --- a/content/en/blog/commands/busybox-web-server.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Busybox web server" -linkTitle: "Busybox web server" -date: 2019-04-16 -description: > - Busybox web server ---- - -If you have been using things like `python -m SimpleHTTPServer`, here is something even more simple and lightweight to use : - -{{< highlight sh >}} -busybox httpd -vfp 80 -{{< /highlight >}} diff --git a/content/en/blog/commands/capture-desktop-video.md b/content/en/blog/commands/capture-desktop-video.md deleted file mode 100644 index f56572a..0000000 --- a/content/en/blog/commands/capture-desktop-video.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Capture a video of your desktop" -linkTitle: "Capture a video of your desktop" -date: 2011-11-20 -description: > - Capture a video of your desktop ---- - -You can capture a video of your linux desktop with ffmpeg : - -{{< highlight sh >}} -ffmpeg -f x11grab -s xga -r 25 -i :0.0 -sameq /tmp/out.mpg -{{< /highlight >}} diff --git a/content/en/blog/commands/clean-conntrack-states.md b/content/en/blog/commands/clean-conntrack-states.md deleted file mode 100644 index 8a78930..0000000 --- a/content/en/blog/commands/clean-conntrack-states.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "Clean conntrack states" -linkTitle: "Clean conntrack states" -date: 2018-03-02 -description: > - Clean conntrack states ---- - -Here is an example of how to clean conntrack states that match a specific query on a linux firewall : - -{{< highlight sh >}} -conntrack -L conntrack -p tcp –orig-dport 65372 | \ -while read _ _ _ _ src dst sport dport _; do - conntrack -D conntrack –proto tcp –orig-src ${src#*=} –orig-dst ${dst#*=} \ - –sport ${sport#*=} –dport ${dport#*=} - done -{{< /highlight >}} diff --git a/content/en/blog/commands/date.md b/content/en/blog/commands/date.md deleted file mode 100644 index e0b2bcc..0000000 --- a/content/en/blog/commands/date.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: "Convert unix timestamp to readable date" -linkTitle: "Convert unix timestamp to readable date" -date: 2011-01-06 -description: > - Convert unix timestamp to readable date ---- - -As I somehow have a hard time remembering this simple date flags as I rarely need it, I decided to write it down here : - -{{< highlight sh >}} -$ date -d @1294319676 -Thu Jan 6 13:14:36 GMT 2011 -{{< /highlight >}} diff --git a/content/en/blog/commands/dmidecode.md b/content/en/blog/commands/dmidecode.md deleted file mode 100644 index c7bcc1f..0000000 --- a/content/en/blog/commands/dmidecode.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "DMIdecode" -linkTitle: "DMIdecode" -date: 2011-02-16 -description: > - DMIdecode ---- - -DMIdecode to obtain Hardware informations. - -## Mose useful commands - -- System informations: `dmidecode -t1` -- Chassis informations: `dmidecode -t4` -- CPU informations: `dmidecode -t4` -- RAM informations: `dmidecode -t17` - -## Sources - -- `man 8 dmidecode` diff --git a/content/en/blog/commands/find-hardlinks.md b/content/en/blog/commands/find-hardlinks.md deleted file mode 100644 index dd1b424..0000000 --- a/content/en/blog/commands/find-hardlinks.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Find hardlinks to a same file" -linkTitle: "Find hardlinks to a same file" -date: 2018-03-02 -description: > - Find hardlinks to a same file ---- - -{{< highlight sh >}} -find . -samefile /path/to/file -{{< /highlight >}} - diff --git a/content/en/blog/commands/find-inodes-used.md b/content/en/blog/commands/find-inodes-used.md deleted file mode 100644 index d9965a4..0000000 --- a/content/en/blog/commands/find-inodes-used.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: "Find where inodes are used" -linkTitle: "Find where inodes are used" -date: 2018-04-25 -description: > - Find where inodes are used ---- - -{{< highlight sh >}} -find . -xdev -printf '%h\n' | sort | uniq -c | sort -k 1 -n -{{< /highlight >}} - diff --git a/content/en/blog/commands/git-import-commits.md b/content/en/blog/commands/git-import-commits.md deleted file mode 100644 index 5ec2bc1..0000000 --- a/content/en/blog/commands/git-import-commits.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Import commits from one git repo to another" -linkTitle: "Import commits from one git repo to another" -date: 2018-09-25 -description: > - Import commits from one git repo to another ---- - -This imports commits from a repo in the `../masterfiles` folder and applies them to the repository inside the current folder : -{{< highlight sh >}} -(cd ../masterfiles/; git format-patch –stdout origin/master) | git am -{{< /highlight >}} - diff --git a/content/en/blog/commands/git-rewrite-commit-history.md b/content/en/blog/commands/git-rewrite-commit-history.md deleted file mode 100644 index 6d241ed..0000000 --- a/content/en/blog/commands/git-rewrite-commit-history.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: "Rewrite a git commit history" -linkTitle: "Rewrite a git commit history" -date: 2018-03-05 -description: > - Rewrite a git commit history ---- - -Here is how to rewrite a git commit history, for example to remove a file : -{{< highlight sh >}} -git filter-branch –index-filter "git rm --cached --ignore-unmatch ${file}" --prune-empty --tag-name-filter cat - -all -{{< /highlight >}} - diff --git a/content/en/blog/commands/ipmi.md b/content/en/blog/commands/ipmi.md deleted file mode 100644 index 93ca26d..0000000 --- a/content/en/blog/commands/ipmi.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: "ipmitool" -linkTitle: "ipmitool" -date: 2018-03-05 -description: > - ipmitool ---- - -- launch ipmi shell : `ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U shell` -- launch ipmi remote text console : `ipmitool -H XX.XX.XX.XX -C3 -I lanplus -U sol activate` -- Show local ipmi lan configuration : `ipmitool lan print` -- Update local ipmi lan configuration : -{{< highlight sh >}} -ipmitool lan set 1 ipsrc static -ipmitool lan set 1 ipaddr 10.31.149.39 -ipmitool lan set 1 netmask 255.255.255.0 -mc reset cold -{{< /highlight >}} - diff --git a/content/en/blog/commands/mdadm.md b/content/en/blog/commands/mdadm.md deleted file mode 100644 index 1dbc3f8..0000000 --- a/content/en/blog/commands/mdadm.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -title: "mdadm" -linkTitle: "mdadm" -date: 2011-11-15 -description: > - mdadm ---- - -## Watch the array status - -{{< highlight sh >}} -watch -d -n10 mdadm --detail /dev/md127 -{{< /highlight >}} - -## Recovery from livecd - -{{< highlight sh >}} -mdadm --examine --scan >> /etc/mdadm.conf -mdadm --assemble --scan /dev/md/root -mount /dev/md127 /mnt # or vgscan... -{{< /highlight >}} - -If auto detection does not work, you can still assemble an array manually : -{{< highlight sh >}} -mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 -{{< /highlight >}} - -## Resync an array - -First rigorously check the output of `cat /proc/mdstat` -{{< highlight sh >}} -mdadm --manage --re-add /dev/md0 /dev/sdb1 -{{< /highlight >}} - -## Destroy an array - -{{< highlight sh >}} -mdadm --stop /dev/md0 -mdadm --zero-superblock /dev/sda -mdadm --zero-superblock /dev/sdb -{{< /highlight >}} - diff --git a/content/en/blog/commands/megacli.md b/content/en/blog/commands/megacli.md deleted file mode 100644 index 8eb32a8..0000000 --- a/content/en/blog/commands/megacli.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: "MegaCLI" -linkTitle: "MegaCLI" -date: 2018-03-05 -description: > - MegaCLI for dell hardware investigations ---- - -- `megacli -LDInfo -LALL -aALL|grep state` -- `MegaCli -PDlist -a0|less` - diff --git a/content/en/blog/commands/omreport.md b/content/en/blog/commands/omreport.md deleted file mode 100644 index b3d0ffd..0000000 --- a/content/en/blog/commands/omreport.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -title: "omreport" -linkTitle: "omreport" -date: 2018-03-05 -description: > - omreport ---- - -## Your raid status at a glance - -- `omreport storage pdisk controller=0 vdisk=0|grep -E '^ID|State|Capacity|Part Number'|grep -B1 -A2 Failed` - -## Other commands - -{{< highlight sh >}} -omreport storage vdisk -omreport storage pdisk controller=0 vdisk=0 -omreport storage pdisk controller=0 pdisk=0:0:4 -{{< /highlight >}} - diff --git a/content/en/blog/commands/qemu-nbd.md b/content/en/blog/commands/qemu-nbd.md deleted file mode 100644 index ea09658..0000000 --- a/content/en/blog/commands/qemu-nbd.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: "qemu-nbd" -linkTitle: "qemu-nbd" -date: 2019-07-01 -description: > - qemu-nbd ---- - -{{< highlight sh >}} -modprobe nbd max_part=8 -qemu-nbd -c /dev/nbd0 image.img -mount /dev/nbd0p1 /mnt # or vgscan && vgchange -ay -[...] -umount /mnt -qemu-nbd -d /dev/nbd0 -{{< /highlight >}} - diff --git a/content/en/blog/commands/qemu.md b/content/en/blog/commands/qemu.md deleted file mode 100644 index b3beb2c..0000000 --- a/content/en/blog/commands/qemu.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "Qemu" -linkTitle: "Qemu" -date: 2019-06-10 -description: > - Qemu ---- - -## Quickly launch a qemu vm with local qcow as hard drive - -In this example I am using the docker0 bridge because I do not want to have to modify my shorewall config, but any proper bridge would do : -{{< highlight sh >}} -ip tuntap add tap0 mode tap -brctl addif docker0 tap0 -qemu-img create -f qcow2 obsd.qcow2 10G -qemu-system-x86_64 -curses -drive file=install65.fs,format=raw -drive file=obsd.qcow2 -net nic,model=virtio,macaddr=00:00:00:00:00:01 -net tap,ifname=tap0 -qemu-system-x86_64 -curses -drive file=obsd.qcow2 -net nic,model=virtio,macaddr=00:00:00:00:00:01 -net tap,ifname=tap0 -{{< /highlight >}} - -The first qemu command runs the installer, the second one just runs the vm. - -## Launch a qemu vm with your local hard drive - -My use case for this is to install openbsd on a server from a hosting provider that doesn't provide an openbsd installer : -{{< highlight sh >}} -qemu-system-x86_64 -curses -drive file=miniroot65.fs -drive file=/dev/sda -net nic -net user -{{< /highlight >}} - -## Ressources - -- https://github.com/dodoritfort/OpenBSD/wiki/Installer-OpenBSD-sur-votre-serveur-Kimsufi diff --git a/content/en/blog/commands/rrdtool.md b/content/en/blog/commands/rrdtool.md deleted file mode 100644 index 33f54dc..0000000 --- a/content/en/blog/commands/rrdtool.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "rrdtool" -linkTitle: "rrdtool" -date: 2018-09-25 -description: > - rrdtool ---- - -## Graph manually - -{{< highlight sh >}} -for i in `ls`; do - rrdtool graph $i.png -w 1024 -h 768 -a PNG --slope-mode --font DEFAULT:7: \ - --start -3days --end now DEF:in=$i:netin:MAX DEF:out=$i:netout:MAX \ - LINE1:in#0000FF:"in" LINE1:out#00FF00:"out" -done -{{< /highlight >}} - -## References - -- https://calomel.org/rrdtool.html -- cgit v1.2.3