-
led-wifi
Service to show signal strength with LEDs.
Copy to/etc/init.d
, runchmod 0755 led-wifi
, enable using/etc/init.d/led-wifi enable
or LuCi. -
poe-pt.sh
Shell script to enable POE-Passthrough on the second ethernet port.
Copy and paste into LuCi startup scripts.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
.night { | |
background: #000; | |
color: #fff; | |
} | |
</style> | |
</head> |
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
#!/usr/bin/python | |
# Grant Assistive Access to Terminal and “osascript”. | |
import sqlite3 | |
conn = sqlite3.connect('/Library/Application Support/com.apple.TCC/TCC.db') | |
conn.cursor().execute("INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','com.apple.Terminal',0,1,1,NULL,NULL)") | |
conn.cursor().execute("INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','$(which osascript)',1,1,1,NULL,NULL)") | |
conn.commit() |
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/sh | |
launchd_name='com.apple.AutoWake' | |
launchd_plist=/Library/LaunchDaemons/"$launchd_name".plist | |
sudo dd of=$launchd_plist <<'EOF' &>/dev/null | |
<plist version="1.0"><dict><key>ProgramArguments</key><array><string>/bin/bash</string><string>-c</string><string>weekdays=MTWRFSU; eventtype=wakeorpoweron; sudo pmset repeat $eventtype $weekdays 05:30:00; for i in {0..23}; do seconds=`date +%s`; seconds=$(($seconds+(3600*$i))); hour=`date -r $seconds +'%m/%d/%y %H'`; minute=`date -r $seconds +%M`; for min in 00 15 30 45; do if [[ $i != 0 ]] || ([[ $i == 0 ]] && [[ $minute -lt $min ]]); then if ! sudo pmset -g sched | grep $eventtype | grep -q "$hour:$min:00"; then sudo pmset schedule $eventtype "$hour:$min:00"; fi; fi; done; done</string></array></dict></plist> | |
EOF | |
sudo plutil -convert xml1 $launchd_plist |
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/sh | |
DATABASE_NAME='wordpress' | |
DATABASE_USER='wordpress' | |
ROOT_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
WORDPRESS_MYSQL_PASSWORD=`dd if=/dev/urandom bs=1 count=32 2>/dev/null | base64 -w 0 | rev | cut -b 2- | rev` | |
# Write Passwords to File. |
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
#!/usr/bin/env sh | |
NAME="Fiat 500 L" | |
# Set Bluetooth Device Name | |
echo "PRETTY_HOSTNAME=\"${NAME}\"" | sudo tee /etc/machine-info | |
# Allow 'pi' user to change bluetooth settings. | |
sudo usermod -a -G lp pi |
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
#!/usr/bin/env sh | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
sudo apt-get dist-upgrade -y | |
yes | wget -q -O - razberry.z-wave.me/install | sudo bash |
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
sudo apt-get install -y ruby | |
sudo gem install sinatra | |
sudo gem install pi_piper |
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
#!/usr/bin/env ruby | |
class ConnectionError < StandardError; end | |
class AndroidDebugBridge | |
require 'open3' | |
EXECUTABLE = `which adb`.chomp | |
DEFAULT_PORT = 5555 |
OlderNewer