Moved to: https://gist.github.com/kleo/00f8c6d0f0e7e4fac94c90876676e9ad
Résumé: https://git.io/kbeflo
| #!/bin/bash | |
| # Make sure that sda is the source by placing the source SATA cable on the first SATA port number | |
| # You will need 1.) clonezilla live | |
| # 2.) a working space for saving our custom clonezilla iso, a flashdrive or any other storage medium | |
| # Needed when cloning later | |
| # 3.) source drive (sda) | |
| # 4.) target drive (sdb) | |
| # | |
| # follow https://clonezilla.org/advanced/customized-clonezilla-live.php | |
| /usr/sbin/ocs-onthefly -batch -g auto -e1 auto -e2 -r -j2 -sfsck -p poweroff -f sda -d sdb |
| #!/bin/bash | |
| # alias foo='torsocks script.sh' | |
| curl -s https://check.torproject.org | sed '/<!doctype/d' | sed '/»/d' | xmlstarlet sel -t -v '//html/body/div[2]/h1' | tr -d '\n' | awk '{$1=$1};1' | |
| echo | |
| curl https://ipv4.icanhazip.com | |
| echo |
| [Unit] | |
| Description=Switch Lan Play | |
| After=network.target network-online.target | |
| [Service] | |
| Type=simple | |
| Restart=on-failure | |
| RestartSec=60 | |
| ExecStart=/home/pi/switch-lan-play/build/src/lan-play --netif eth0 --pmtu 500 --relay-server-addr lanplay.cpalm.org:11451 |
| https://thiru.in/333/tech/get-github-vanity-url-git-io/ | |
| $ curl -i https://git.io -F "url=https://github.com/ithiru" -F "code=thiru" | |
| HTTP/1.1 100 Continue | |
| HTTP/1.1 201 Created | |
| Server: Cowboy | |
| Connection: keep-alive | |
| Date: Thu, 22 Sep 2016 05:05:35 GMT | |
| Status: 201 Created |
| # USB debugging enabled remove/change lock screen password SM-N910K (2017-02-18) | |
| # Copy lock screen password | |
| /data/data/com.android.providers.settings/databases/settings.db | |
| # Copy MMS/SMS storage (optional) | |
| /data/data/com.android.providers.telephony/databases/mmssms.db | |
| # Remove or change the password entry from settings.db copy | |
| # I used DB.Browser.for.SQLite-3.9.1-win64.exe from https://sqlitebrowser.org/ |
| # timwr/CVE-2016-5195 dirtycow vagrant | |
| vagrant init debian/stretch64 | |
| vagrant up | |
| # remote forward adb server port on host to vagrant | |
| vagrant ssh -- -R 5037:localhost:5037 |
| # https://bbs.archlinux.org/viewtopic.php?pid=1628620#p1628620 | |
| mount -o remount,size=4G /run/archiso/cowspace |