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 | |
function usage { | |
echo "Usage:" | |
echo "last_tweet.sh <api key> <api secret> <username>" | |
exit 1 | |
} | |
if [ -z $1 ] || [ -z $2 ] || [ -z $3 ]; then | |
usage |
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 | |
#### | |
# last_flickr.sh | |
# | |
# Queries Flickr's APIs for the last upload by the given user. | |
# (Only tested on OSX) | |
## | |
function usage { |
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
# OpenVPN autostart on boot script | |
# Originally by Jan: | |
# http://www.hackerway.ch/2012/12/11/how-to-auto-start-openvpn-client-in-debian-6-and-ubuntu-12-04/ | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
exec /usr/sbin/openvpn --status /var/run/openvpn.client.status 10 --cd /etc/openvpn --config /etc/openvpn/client.conf --syslog openvpn |
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 | |
# | |
# my_app This shell script takes care of starting and stopping my_app | |
# | |
# chkconfig: - 80 20 | |
# | |
### BEGIN INIT INFO | |
# Provides: my_app | |
# Required-Start: $network $syslog | |
# Required-Stop: $network $syslog |
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
import subprocess | |
import os | |
import re | |
repo_folder_name='repo_name' | |
home = os.environ['HOME'] | |
p = subprocess.Popen(['plutil', '-convert', 'xml1', '-o', '-', '--', "%s/Library/Application Support/SourceTree/browser.plist" % home], | |
stdout=subprocess.PIPE, | |
stderr=subprocess.PIPE) |
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
# opends | |
description "OpenDS LDAP Server" | |
author "Joey Mink <[email protected]>" | |
start on (filesystem and net-device-up IFACE=lo) | |
setuid opends | |
exec /opt/OpenDS-2.3.0-build003/bin/start-ds --nodetach |
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
description "Tomcat Server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
# run as non privileged user | |
# add user with this command: | |
## adduser --system --ingroup www-data --home /opt/apache-tomcat apache-tomcat |