This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Purpose: Write the passed in parameter as hostid to /etc/hostid | |
# If no parameter is passed, write current hostid to /etc/hostid | |
# Original Author: Fazle Arefin <[email protected]> | |
# http://fazlearefin.blogspot.ca/2013/03/set-hostid-etchostid-of-linux-hosts.html | |
# Modified by David Manouchehri <[email protected]> | |
if [ -n "$1" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Running 1.01A (1.0.1.0) | |
http://chdk.wikia.com/wiki/SX260 | |
http://mighty-hoernsche.de/trunk/ - Unstable New Development Version 1.4 | |
sx260hs-101a-1.4.0-[THIS CHANGES]-full.zip | |
unzip sx260hs-101a-1.4.0-*-full.zip to SD card | |
Go to menu, update firmware (needed for each initial boot) | |
After that initial boot happens, go into the CHDK menu and make the card bootable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -o rw,remount /system | |
sed -i 's/qemu.hw.mainkeys=1/qemu.hw.mainkeys=0/g' /system/build.prop | |
/qemu.hw.mainkeys=0/g' /system/build.prop # Turn softkeys back on. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'David Manouchehri' | |
from bs4 import BeautifulSoup | |
import urllib.request | |
import gzip | |
import io | |
url = 'http://yoururlgoesherehopefullythisisntavalidurl.com/pages.html' | |
headers = {'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product: http://www.aliexpress.com/snapshot/6329414611.html | |
Title: VK-172 GMOUSE USB GPS/GLONASS USB FZ1007 | |
Price: $10.07 USD | |
Chip info: | |
ublox | |
G7020-XT | |
C1010A | |
01119364 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias aria2c='aria2c -x16 -j32 -s32 --header="User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0" --header="Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" --header="Accept-Encoding: gzip, deflate" --header="Accept-Language: en-US,en;q=0.5"' | |
alias rc.d='systemctl' | |
alias xzip='zip -9' | |
alias xtar='XZ_OPT="-9e" tar --owner=root --group=root -Jcvf' | |
shopt -s histappend | |
PROMPT_COMMAND='history -a; history -n' | |
export EDITOR="vim" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir smi2021-tree/ && cd smi2021-tree/ | |
git init | |
git config core.sparseCheckout true | |
echo drivers/media/usb/smi2021/ >> .git/info/sparse-checkout | |
git remote add origin https://github.com/jonjonarnearne/smi2021.git | |
git fetch origin --depth=33 | |
git pull origin smi2021v3-wip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkdir smi2021-tree/ && cd smi2021-tree/ | |
# git init | |
# git config core.sparseCheckout true | |
# echo drivers/media/usb/smi2021/ >> .git/info/sparse-checkout | |
# git remote add origin https://github.com/jonjonarnearne/smi2021.git | |
# git fetch origin --depth=1 | |
# git pull origin smi2021v3-wip | |
# cd drivers/media/usb/smi2021/ | |
# make -C /lib/modules/$(uname -r)/build M=$PWD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host * | |
ControlMaster auto | |
ControlPath /home/dave/.ssh/sockets/%r@%h-%p | |
ControlPersist 8760h | |
ServerAliveInterval 5 | |
ServerAliveCountMax 1 | |
Host *.mun.ca | |
User dave | |
IdentityFile /home/dave/.ssh/keymun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.piware.de/2011/01/creating-an-https-server-in-python/ | |
import BaseHTTPServer, SimpleHTTPServer | |
import ssl | |
httpd = BaseHTTPServer.HTTPServer(('localhost', 4443), SimpleHTTPServer.SimpleHTTPRequestHandler) | |
httpd.socket = ssl.wrap_socket (httpd.socket, certfile='path/to/localhost.pem', server_side=True) | |
httpd.serve_forever() |
OlderNewer