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
server { | |
listen 80; | |
server_name domain.tld; | |
rewrite ^(.+)$ https://$server_name$1 redirect; | |
} | |
server { | |
listen 443; | |
include /etc/nginx/ssl.conf; | |
server_name domain.tld; |
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 | |
# | |
# Script to update Linode's DNS Manager for a given name. | |
# | |
# Things you need to change. | |
APIKEY=$(cat ~/.linode-apikey) | |
LASTIP="/tmp/lastip" | |
DOMAIN="domain.com" | |
SOAEMAIL="[email protected]" |
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/rake -f ~/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com [email protected] password=password ssl=1 port=993 move_on_success=success move_on_failure=failure |
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 | |
# encoding: utf-8 | |
HASTTAGS_GROUPS = { | |
'gtalug': 'GTALUG', | |
'pygta': 'PyGTA', | |
'asgardproject': 'AsgardProject', | |
'asgard': 'AsgardProject', | |
'http': 'HTTP', | |
'html': 'HTML', |
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 | |
# encoding: utf-8 | |
""" | |
pygtatweet2identica.py | |
PyGTATweet2Identica converts PyGTA's Twitter timeline to PyGTA's | |
Identi.ca timeline. | |
Created by Myles Braithwaite on 2009-11-02. | |
Copyright (c) 2009 PyGTA (Python GTA User Group). |
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 | |
myen0=`ifconfig en0 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'` | |
myen1=`ifconfig en1 | grep "inet " | grep -v 127.0.0.1 | awk '{print $2}'` | |
wip=`/usr/bin/curl --silent http://checkip.dyndns.org | awk '{print $6}' | cut -f 1 -d "<"` | |
INACTIVE='INACTIVE' | |
if [ "$myen0" != "" ] | |
then | |
echo "Ethernet: $myen0" | |
else |
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 | |
# Get weather image | |
# Add this to your crontab. | |
YAHOO_WEATHER_HTML=`curl --silent "http://weather.yahoo.com/canada/ontario/toron | |
to-4118/?unit=c"` | |
curl --silent -o /tmp/weather.html "http://weather.yahoo.com/canada/ontario/toro | |
nto-4118/?unit=c" | |
if [[ $YAHOO_WEATHER_HTML ]]; then |
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 smtpd, asyncore, logging | |
class SMTPDebuggingServer(smtpd.SMTPServer): | |
def process_message(self, peer, mailfrom, rcpttos, data): | |
# print "Sending mail to %s" % (','.join(rcpttos)) | |
log.info("Sending mail to %s\n\n%s" % (','.join(rcpttos), data)) | |
if __name__ == "__main__": |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
# use epoll; | |
} | |
http { | |
upstream www { | |
server 127.0.0.1:8880; |
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
> Myles Braithwaite's Custom Quix Commands | |
> myles-quix.txt | |
@Myles Braithwaite's Custom Quix Commands | |
a http://www.amazon.ca/s/?field-keywords=%s Amazon Search | |
tweetie tweetie:%5B%t%5D%28%r%29 Send current page link to Tweetie | |
sub javascript:(function(){s=document.createElement('script');s.type='text/javascript';s.src='http://fever.mylesbraithwaite.com/?feedlet&js&'+(new%20Date()).getTime();document.getElementsByTagName('head')[0].appendChild(s);})(); Fever Subscribe |
OlderNewer