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
Arts & Entertainment | |
Beauty & Personal Care | |
Business & Industrial | |
Computers & Consumer Electronics | |
Dining & Nightlife | |
Family & Community | |
Finance | |
Food & Groceries | |
Health | |
Hobbies & Leisure |
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 | |
mkdir /Volumes/disk2 | |
mount -t nfs m3dia.us:/export/disk2 /Volumes/disk2 |
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
function loadJSInclude(scriptPath, callback) | |
{ | |
var scriptNode = document.createElement('SCRIPT'); | |
scriptNode.type = 'text/javascript'; | |
scriptNode.src = scriptPath; | |
var headNode = document.getElementsByTagName('HEAD'); | |
if (headNode[0] !== null) | |
headNode[0].appendChild(scriptNode); |
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
# Emperor uWSGI script | |
description "uWSGI Emperor" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
respawn | |
exec /usr/bin/uwsgi --master --enable-threads --emperor /etc/uwsgi/apps-enabled --die-on-term --uid www-data --gid www-data --logto /var/log/uwsgi/emperor.log |
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
@app.route('/post-receive-hook', methods=['GET', 'POST']) | |
def post_receive_hook(): | |
if request.method == "POST" and request.form['payload']: | |
payload = json.loads(request.form['payload']) | |
pprint(payload) | |
output = subprocess.Popen('sh /home/user/post-receive-script.sh'.split(), stdout=subprocess.PIPE).communicate()[0] | |
print output # for debugging | |
return "Hi!" | |
else: | |
abort(404) |
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 | |
if [ "$1" ]; then | |
#site argument is set | |
if [ -L /etc/nginx/sites-enabled/$1 ]; then | |
#symbolic link does not exist, enable the site | |
echo "Disabling nginx site $1!" | |
sudo rm /etc/nginx/sites-enabled/$1 | |
sudo service nginx restart | |
else | |
#symbolic link exists, give the user a message |
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
<style> | |
.apixchange-embed-button { | |
font-family: "Lato", sans-serif; | |
display: inline-block; | |
border: 2px solid #eee; | |
border-radius: 5px; | |
background: #FFF; | |
width: 227px; | |
white-space: nowrap; | |
} |