This file contains hidden or 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/sh | |
if [[ $UID != 0 ]]; then | |
echo 'The script needs to run as root' && exit 1 | |
fi | |
rfkill unblock wlan | |
ifconfig wlan0 192.168.100.1/24 up | |
sysctl -q net.ipv4.ip_forward=1 |
This file contains hidden or 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
const URLS_FILENAME = 'urls.txt'; | |
const GOOGLE_EMAIL = 'YOUR_EMAIL'; | |
const GOOGLE_PASSWD = 'YOUR_PASSWORD'; | |
// Read URLs from the file. | |
var fs = require('fs'); | |
var stream = fs.open(URLS_FILENAME, 'r'); | |
var urls = []; | |
while (!stream.atEnd()) { |
This file contains hidden or 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 | |
update() { | |
echo -n "Update \"$1\" [Y/n]? " | |
stty cbreak | |
local char=$(dd if=/dev/tty bs=1 count=1 2>/dev/null) | |
stty -cbreak | |
if [[ $char != '' ]] ; then | |
echo |