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 | |
URL="http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2.tar.bz2" | |
URL64="http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2" | |
LOCALDIR=/usr/local | |
[ "`uname -m`" = "x86_64" ] && URL="$URL64" | |
[ "`id -u`" = "0" ] || (echo "You should run this script as root" && exit 1) | |
wget -nv $URL -O - | tar -C "$LOCALDIR" -xvjf - |
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 | |
setif() { | |
iw dev | grep -q "Interface $1" | |
local status=$? | |
[ "$2" = "down" ] && [ "$status" = "0" ] && { | |
[ -d "/sys/class/net/$1/master" ] && ip link set dev "$1" nomaster | |
iw dev "$1" del | |
return | |
} |
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
127.0.0.1 fsr.lenovomm.com | |
127.0.0.1 lds.lenovomm.com | |
127.0.0.1 susapi.lenovomm.com |
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
/var/log/dnsmasq/dnsmasq.log { | |
daily | |
rotate 30 | |
compress | |
delaycompress | |
missingok | |
notifempty | |
postrotate | |
[ -r /var/run/dnsmasq/dnsmasq.pid ] && kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` | |
endscript |
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 | |
LOWER=15 | |
BANTIME=5000 | |
iw event | while read line; do | |
case "$line" in | |
*": new station "*) | |
iface="${line%%:*}" | |
mac=`echo "${line##* }" | tr [a-f] [A-F]` |
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
apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc | |
echo 'deb http://repos.codelite.org/debian/ jessie contrib' >/etc/apt/sources.list.d/codelite.list | |
apt-get update | |
apt-get install -y codelite |
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
is_number() { | |
case "$1" in | |
""|*[!0-9]*) return 1 ;; | |
*) return 0 ;; | |
esac | |
} |
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 | |
# kicad2dp: Renames the Gerber files generated by KiCad to meet | |
# the naming convention required by DirtyPCBs.com PCB service. | |
# | |
# Usage: kicad2dp project_name | |
# project_name is the substring common to the all generated Gerber files. | |
# | |
# Note: This script works only for two layer PCBs, but could be easily | |
# extended for 4-layer boards. |
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 python | |
import serial | |
import random | |
from time import sleep | |
wait = 0.1 | |
sp = serial.Serial(port='/dev/ttyACM0', baudrate=9600, timeout=2, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS) | |
def clean_buffer(sp): |
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
from onvif import ONVIFCamera | |
mycam = ONVIFCamera('192.168.0.199', 80, 'admin', '12345', '/usr/local/wsdl') | |
media = mycam.create_media_service() | |
media.GetSnapshotUri() |
OlderNewer