Skip to content

Instantly share code, notes, and snippets.

Avatar
📡
E.T. Phone Home

Parker Moore parkr

📡
E.T. Phone Home
View GitHub Profile
View instapaper.rb
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 Apr 16, 2011
An Xcode theme based on fapfap's TextMate theme. http://fapfap.se/2011/03/01/my-textmate-setup/ for the theme.
View fapfap.xccolortheme
<?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 Sep 20, 2011
Python Line Count
View line_count.py
#! /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 Dec 19, 2011
Leacock's Projects List
View dabblet.css
/**
* 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 Dec 21, 2011
Nav bar for parkermoore.de
View dabblet.css
/**
* 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 Dec 24, 2011
ParkerMoore.de Redesign
View dabblet.css
/**
* 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 Dec 30, 2011
Amazon Order Reports: Count the Number of Purchases Per Day Given a Keyword
View sales_report_by_day.rb
#!/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
Name Parsing in PHP
View parse_name.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
Scroll text behind container
View dabblet.css
/**
* 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
Re: iPhone CSS Detector
View detector.php
<?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" />
You can’t perform that action at this time.