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
#!/bin/sh | |
filename=$1 | |
echo "Begin processing file:" $filename | |
dimensions=$(identify -format '%w %h' $filename) | |
IFS=' ' read -a array <<< "$dimensions" | |
width=${array[0]} | |
height=${array[1]} |
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; | |
} |
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
description "uWSGI" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
respawn | |
env UWSGI=/usr/bin/uwsgi | |
env LOGTO=/var/log/uwsgi/emperor.log | |
exec $UWSGI --master --emperor /etc/uwsgi/apps-enabled --die-on-term --uid www-data --gid www-data --logto $LOGTO |
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
$(document).ready(function(){ | |
$('.close').click(function(){ | |
$(this).closest('.popover').remove(); | |
}); | |
}); |
OlderNewer