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
/* | |
Welcome to Custom CSS! | |
Picking out the yellow color in Autommattic's Hew theme: | |
https://wordpress.com/themes/hew | |
http://wptavern.com/hew-a-free-wordpress-blogging-theme-inspired-by-ryu | |
*/ | |
#masthead, | |
#infinite-handle span, |
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/python2 | |
import transmissionrpc | |
## connection paramters - change to match your own settings | |
creds = {'address':'localhost', 'port':9091 'user':'my_user_name_here', 'password':'my_password_here'} | |
## establishing contact | |
tm_client = transmissionrpc.Client(creds['address'], creds['port'], creds['user'], creds['password']) | |
torrents_lst = tm_client.list() |
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
INITIALIZATION | |
git clone -o [name to use to refer to repo] [url] | |
REMOTE -> LOCAL | |
git remote update: download changes from github | |
git diff github/[branch]: see changes between local and origin | |
git merge github/[branch]: merge changes from origin into local | |
git pull [origin] [branch]: |
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 | |
/** | |
* SSL for media library | |
*/ | |
function have_https_for_media( $url ) { | |
if ( is_ssl() ) | |
$url = str_replace( 'http://', 'https://', $url ); | |
return $url; |
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
import urllib.request | |
import urllib.error | |
import signal | |
class NoMoreBufferException(Exception): | |
pass | |
class TimesUpException(Exception): | |
pass |
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
class BufferSMTPHandler(handlers.BufferingHandler): | |
'''SMTPHandler that send one email per flush''' | |
def __init__(self, email, paths): | |
handlers.BufferingHandler.__init__(self, capacity=5) | |
self.state = get_state(path) | |
self.buffer = self.state.buffer | |
self.email = email | |
smtp_formatter = logging.Formatter("%(asctime)s %(message)s", | |
datefmt='%Y-%m-%d %H:%M') | |
self.setFormatter(smtp_formatter) |
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/pulseaudio -nF | |
# | |
# This file is part of PulseAudio. | |
# | |
# PulseAudio is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU Lesser General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# PulseAudio is distributed in the hope that it will be useful, but |