Skip to content

Instantly share code, notes, and snippets.

View parkr's full-sized avatar
📡
E.T. Phone Home

Parker Moore parkr

📡
E.T. Phone Home
View GitHub Profile
require 'omniauth/oauth'
require 'multi_json'
module OmniAuth
module Strategies
class Instapaper < OmniAuth::Strategies::XAuth
def initialize(app, consumer_key = nil, consumer_secret = nil, options = {}, &block)
client_options = {
:title => 'Instapaper',
@parkr
parkr / fapfap.xccolortheme
Created April 16, 2011 04:33
An Xcode theme based on fapfap's TextMate theme. http://fapfap.se/2011/03/01/my-textmate-setup/ for the theme.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Colors</key>
<dict>
<key>Background</key>
<string>0.213 0.245 0.274</string>
<key>InsertionPoint</key>
<string>1.000 1.000 1.000</string>
@parkr
parkr / line_count.py
Created September 20, 2011 01:34
Python Line Count
#! /usr/bin/env python
# By Parker Moore, http://www.parkermoore.de/
# Referenced the following URLs and compiled:
# http://lookherefirst.wordpress.com/2007/12/03/check-if-an-entry-is-a-file-or-directory-in-python/
# http://stackoverflow.com/questions/845058/how-to-get-line-count-cheaply-in-python
import sys, os
def file_len(fname):
@parkr
parkr / dabblet.css
Created December 19, 2011 00:57
Leacock's Projects List
/**
* Leacock's Projects List
*/
body {
background: #eee;
min-height:100%;
font-family: "Alte Haas Grotesk", Tahoma, Geneva, Tahoma, sans-serif;
padding-top: 63px;
text-align: center;
@parkr
parkr / dabblet.css
Created December 21, 2011 20:27
Nav bar for parkermoore.de
/**
* Nav bar for parkermoore.de
*/
@import url("http://www.parkermoore.de/dump/new_home.css");
nav {
border-top: #ddd 1px solid;
border-bottom: #ddd 1px solid;
text-align: center;
@parkr
parkr / dabblet.css
Created December 24, 2011 18:51
ParkerMoore.de Redesign
/**
* ParkerMoore.de Redesign
*/
@import url("http://www.parkermoore.de/dump/new_home.css");
body {
background-color: rgba(185, 250, 195, 0.15623);
}
@parkr
parkr / sales_report_by_day.rb
Created December 30, 2011 00:17
Amazon Order Reports: Count the Number of Purchases Per Day Given a Keyword
#!/usr/bin/env ruby -wKU
#
# This script produces a CSV file of day-by-day sales given a keyword.
#
keyword = /Concert Ticket */
unless ARGV.empty?
filename = ARGV[0].to_s.strip
@parkr
parkr / parse_name.php
Created May 1, 2012 06:28
Name Parsing in PHP
<?php
/**
* This "Parse" class contains one method, "parseFullName",
* which takes a full name as a single string (including
* titles and name suffixes) and parses it into a separated
* name array for a CakePHP project of mine which uses a
* "Member" model.
*
* Please feel free to critique! If you use this in your work,
@parkr
parkr / dabblet.css
Created May 13, 2012 20:42
Scroll text behind container
/**
* Scroll text behind container
*/
body { background-color: #cccccc; font-size: 2em; }
#content { background-color: #dddddd; height: 600px; width: 100%; overflow: hidden; }
#text_container {
background-color: transparent;
border-top: 40px transparent solid;
@parkr
parkr / detector.php
Created May 18, 2012 21:15
Re: iPhone CSS Detector
<?php $stylesheet = (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) ? "iphone.css" ? "default.css"; ?>
<link rel="stylesheet" href="/css/<?php echo $stylesheet; ?>" type="text/css" media="screen" />