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
require('js-yaml'); | |
function writeLn(line) { | |
var now = new Date(); | |
console.log(now.toGMTString() + ' - [' + jobs + '] - ' + line); | |
} | |
function executeJob(data) { | |
if (!connection_working) { |
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
<?php | |
public function getLinkifiedText() { | |
$text = $this->getTweetText(); | |
$entities = new \stdClass; | |
if ($urls = $this->getEntitiesUrls()) { | |
$urls = unserialize($urls); |
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
_____ totally vegan | |
/ | |
,;'OO';, ,;'OO';, ,;'OO';, | |
|',_OO_,'| |',_OO_,'| |',_OO_,'| | |
| | | | | | | |
'.____.' '.____.' '.____.' |
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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Ubuntu 11.04 | |
# Last tested & updated 10/14/2011 | |
#################################### | |
#sudo apt-get update | |
#sudo apt-get dist-upgrade |
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
alias geartop='watch "gearadmin --status | grep -v -P '"'0\t0\t'"'"' |
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 swapon -s | grep -q /mnt/swapfile | |
then | |
echo "Swapfile already mounted" | |
else | |
if [ -e /mnt/swapfile ] | |
then | |
echo "Mounting swapfile" | |
swapon /mnt/swapfile |
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 | |
function fgcolor { | |
echo "\033[38;5;"$1"m" | |
} | |
for i in `seq 1 256` | |
do | |
echo -e "$(fgcolor $i)color-$i" | |
done |
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 | |
# | |
# Removes the Bing logo from Satellite Eyes wallpapers | |
# | |
# Delete the Bing logo image | |
rm -f /Applications/Satellite\ Eyes.app/Contents/Resources/bing-logo.png | |
# Clear the map cache | |
rm -f ~/Library/Application\ Support/Satellite\ Eyes/map-*.png |
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
find . -type f -name '*.jpg' | xargs mogrify -define jpeg:size=640x640 -thumbnail 320x320^ -gravity center -extent 320x320 |
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 | |
i=0 | |
while true | |
do | |
i=$(($i+1)) | |
status=$(curl -H 'Content-Type: application/json' --request POST --data '{"data":"Goodbye world!"}' --write-out %{http_code} --silent https://tourbillon.herokuapp.com/dev/null) | |
if [ "$status" -eq 200 ] | |
then | |
echo "$i Discarded successfully." | |
else |