Skip to content

Instantly share code, notes, and snippets.

Avatar

Ian Beck onecrayon

View GitHub Profile
@onecrayon
onecrayon / archive-tweets.py
Created Jul 4, 2012
Sorts Markdown-formatted tweets monthly files; see http://beckism.com/2012/07/archiving-tweets/ for info
View archive-tweets.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
'''
This script parses a text file of tweets (generated by [IFTTT][1],
for instance) and sorts them into files by month. You can run it
manually from the command line:
cd /path/to/containing/folder
./archive-tweets.py /path/to/@username.txt
@onecrayon
onecrayon / cordova-shim.js
Created May 9, 2012
Simple shim code for Enyo 2 apps to provide commonly-used Cordova events on webOS
View cordova-shim.js
// Fool the script into thinking Cordova is running (since we don't actually need it for webOS)
var cordova = {};
// Add our deviceready event
document.addEventListener('DOMContentLoaded', function () {
// fire deviceready event; taken straight from phonegap-iphone
// put on a different stack so it always fires after DOMContentLoaded
window.setTimeout(function () {
var e = document.createEvent('Events');
e.initEvent('deviceready');
View Monokaffee.css
/*
@theme Monokaffee
@override-placeholders html, css, js, php
*/
@base {
color: #F8F8F2;
background-color: #272822;
insertion-point-color: #F8F8F2;
selection-background-color: #49483E;
View gist:122443
bundle = [NSBundle bundleWithIdentifier:@'com.onecrayon.tea.espresso']
defaults = [NSUserDefaults standardUserDefaults]
[defaults registerDefaults:[NSDictionary dictionaryWithContentsOfFile:[bundle pathForResource:@'Defaults' ofType:@'plist']]]
@onecrayon
onecrayon / YahooPipes_PostProcessor.php
Created Apr 26, 2009
Changes homepage to your own in a Yahoo Pipe
View YahooPipes_PostProcessor.php
<?php
/*
Script for converting a Yahoo Pipe's homepage URL into something more sensible
Requires cURL to be enabled
*/
// CHANGE THESE VARIABLES
// In the link http://pipes.yahoo.com/pipes/pipe.run?_id=uCxBbzww3hGB9ClS6ycw5g&_render=php
// the pipe ID is uCxBbzww3hGB9ClS6ycw5g (everything after _id= and before &_render
$pipe_id = '';
View gist:96765
.clearfix {
zoom: 1;
}
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
View gist:96762
html {
height: 100%;
overflow: auto;
}
body {
height: 100%;
text-align: center;
}
You can’t perform that action at this time.