Skip to content

Instantly share code, notes, and snippets.

View myles's full-sized avatar
🦖

Myles Braithwaite myles

🦖
View GitHub Profile
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;
#!/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="hostmaster@domain.com"
/usr/bin/rake -f ~/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.gmail.com username=email@domain.com password=password ssl=1 port=993 move_on_success=success move_on_failure=failure
#!/usr/bin/env python
# encoding: utf-8
HASTTAGS_GROUPS = {
'gtalug': 'GTALUG',
'pygta': 'PyGTA',
'asgardproject': 'AsgardProject',
'asgard': 'AsgardProject',
'http': 'HTTP',
'html': 'HTML',
#!/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).
#!/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
#!/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
#!/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__":
worker_processes 1;
events {
worker_connections 1024;
# use epoll;
}
http {
upstream www {
server 127.0.0.1:8880;
> 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