Skip to content

Instantly share code, notes, and snippets.

radmen / .htaccess
Created Jan 2, 2013
Wordpress lazy static site generator
View .htaccess
RewriteEngine On
RewriteBase /
RewriteCond %{DOCUMENT_ROOT}/static/%{REQUEST_URI} -f
RewriteRule ^(.*)$ /static/$1 [L,QSA]
RewriteCond %{DOCUMENT_ROOT}/static/%{REQUEST_URI}/index.html -f
RewriteRule ^(.*)$ /static/$1/index.html [L,QSA]
RewriteRule ^index\.php$ - [L]
sweinberg / Geometry Notes Second Semester
Created Jun 26, 2013
My second semester Geometry notes and final exam study guide.
View Geometry Notes Second Semester
#Geometry Notes Second Semester
##Area, Surface Area and Volume
* Circumference is the linear distance around the outside of a circular object.
* C = π • d or π • 2r.
bryanjclark / adn-createStreamAndMonitor
Created Nov 9, 2013
I'm trying to build a Python-based push notification process. Eventually, I'll host it on a Mac or on AWS, and send out push notifications through there. Here's my current working copy (I'll update it occasionally) in trying to build that python service.
View adn-createStreamAndMonitor
import time
import json
import requests
from pprint import pprint
# Here's what I want running on the server. For now, I'm running it on my local machine.
appTokenURL = ''
clientID = 'MY_CLIENT_ID'
banterability /
Last active Jan 14, 2016
Get iPhone battery life over time from Reporter App's ( logs in Dropbox
async = require 'async'
fs = require 'fs'
{filter, flatten} = require 'underscore'
OBJ_C_EPOCH = 978307200
DROPBOX_DIR = #"<path to your dropbox folder >/Dropbox/Apps/Reporter-App/"
fs.readdir DROPBOX_DIR, (err, files) ->
throw new err if err?
dataFiles = filter files, (filename) -> /.json/.test filename
junerockwell / app.js
Last active Feb 2, 2016
ngMap for Ionic
View app.js
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
// the 2nd parameter is an array of 'requires'
// 'starter.controllers' is found in controllers.js
angular.module('starter', [
Zettt / Daily
Created Nov 19, 2012
Daily Diary in Python for Pythonista ( Original post: )
View Daily
import webbrowser
import urllib
dayone_url = "dayone://post?entry="
feeling_question = "How do you feel today?"
achievement_question = "What are you trying to achieve today?"
thought_question = "Is there a negative thought or positive on your mind you want to get out?"
tag = "#diary"
# input
styledev / Parse Tweet Message to Link Entities
Last active Mar 24, 2016
This function will linkify your tweet messages from the Twitter API using include_entities=true
View Parse Tweet Message to Link Entities
AdrianoFerrari / tex-to-pdf
Created Apr 3, 2015
Node server to take Gingko Tex output into PDF
View tex-to-pdf
var TreeId = "your_tree_id_here";
var Filename = "output_filename";
var http =require('http');
var fs = require('fs');
var request = require('request');
var exec = require('child_process').exec;
var header = fs.readFileSync('parts/header.tex', 'utf8');
var footer = fs.readFileSync('parts/footer.tex', 'utf8');
var replacements = { '\\\\begin\\{center\\}\\\\rule\\{3in\\}\\{0\\.4pt\}\\\\end\\{center\\}': '\\hr', '\\\\section\{([^\}]*)\}\\\\label\{([^\}]*)\}\\n\\n([^\.]*[\\.\\\'\\\'\\?\\!]*)\\s': '\\finishchapter\n\\section{$1}\\label{$2}\n\\setupchapter\n\\newthought{$3} ' };
hailiang-wang / index.html
Created Nov 29, 2014
ion-search directive with Ionic framework
View index.html
<html ng-app="ionicApp">
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Search directive example</title>
View Ionic-UL-search-example.markdown