This file contains hidden or 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
// test whether file is being called directly. | |
// define a class | |
if (strtoupper(__FILE__)==strtoupper($_SERVER['SCRIPT_FILENAME'])) { | |
// demonstrate class | |
} |
This file contains hidden or 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
<!-- this is awesome. typing: --> | |
div.news-item*3>h2+div.date+p+p+a.link-cta | |
<!-- followed by ctrl+e in coda generates the following mark-up --> | |
<div class="news-item"> | |
<h2></h2> | |
<div class="date"></div> | |
<p></p> |
This file contains hidden or 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/python | |
# This is the script we used to use to manage the flair on /r/bjj. It's now useless due to | |
# reddit doing flair assignment, but left it up for posterity or just in case someone wants | |
# a working example of reading from a CSV. | |
import csv, re, time | |
from urllib2 import urlopen | |
from redditclient import RedditClient |
This file contains hidden or 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
DEST=$1 | |
WP='http://wordpress.org/latest.tar.gz' | |
wget $WP | |
tar zxvf latest.tar.gz | |
mv wordpress $DEST | |
rm latest.tar.gz | |
cd $DEST |
This file contains hidden or 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 __autoload($class_name) { | |
$parent_path = realpath(dirname(__FILE__).'/'.str_replace("_", "/", $class_name).'.php'); | |
if(file_exists($parent_path)) { | |
require_once $parent_path; | |
} | |
$child_path = realpath( get_stylesheet_directory() . '/class/'. str_replace("_", "/", $class_name).'.php' ); | |
if(file_exists($child_path)) { | |
require_once $child_path; | |
} |
This file contains hidden or 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($){ | |
var previous_state = '', | |
state; | |
$(function(){ | |
// Resize event | |
var resizeTimer = null; /* use resizeTimer to minimise lag */ | |
$(window).resize( function(){ |
This file contains hidden or 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
# pre-requisites: | |
# growlnotify (found as part of the Extras folder in the Growl distribution) | |
# DMDirc redirect plugin | |
# DMDirc exec plugin | |
# This section indicates which sections below take key/value | |
# pairs, rather than a simple list. It should be placed above | |
# any sections that take key/values. | |
keysections: | |
condition 0 |
This file contains hidden or 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 | |
require 'vendor/autoload.php'; | |
$client = new DailymilePHP\Client; | |
$entries = $client->getEntries(['username' => 'simons', 'page' => 'all', 'since' => '1325462400']); | |
echo 'Entries: ' . count($entries). "\n"; | |
$runningEntries = array_filter($entries, function($entry) { |
This file contains hidden or 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
license: mit |
This file contains hidden or 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
license: mit |
OlderNewer