Skip to content

Instantly share code, notes, and snippets.

View cbowns's full-sized avatar

Christopher Bowns cbowns

View GitHub Profile
@cbowns
cbowns / gist:1115893
Created July 30, 2011 19:30
Patch for PageOne (http://globalmoxie.com/blog/page-one-safari-chrome-extension.shtml) to support more Slate.com articles
diff --git a/pageone/pageone.safariextension/singlepage_init.js b/pageone/pageone.safariextension/singlepage_init.js
index 6a13089..a709389 100644
--- a/pageone/pageone.safariextension/singlepage_init.js
+++ b/pageone/pageone.safariextension/singlepage_init.js
@@ -7,7 +7,7 @@ var GM_SPN = {
'theatlantic.com' : [ /\/archive\//, '/print/' ],
'gourmet.com' : 'printable=true',
'details.com' : 'printable=true',
- 'slate.com' : [ /(\/id\/\d+\/)($|pagenum\/\d+.*)/, '$1pagenum/all/'],
+ 'slate.com' : [ /(\/id\/\d+\/)($|pagenum\/\d+.*|\?from=rss)/, '$1pagenum/all/'],
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
# first you'll want to create a gist then `git clone` the private url
# second you'll want to run this script in the gist's directory
loop do
`git commit -a -m save && git push origin master`
sleep 60 * 4
end
@cbowns
cbowns / cgfloat-64-bit-macros.h
Last active August 29, 2015 14:08 — forked from samdmarshall/gist:6891174
A collection of macros for supporting mathematic functions on both 32- and 64-bit systems.
#pragma mark -
#pragma mark CGFloat
#pragma mark Trigonometric Functions
#define CGFloatCos(a) (CGFLOAT_IS_DOUBLE ? cos(a) : cosf(a))
#define CGFloatSin(a) (CGFLOAT_IS_DOUBLE ? sin(a) : sinf(a))
#define CGFloatTan(a) (CGFLOAT_IS_DOUBLE ? tan(a) : tanf(a))
#define CGFloatACos(a) (CGFLOAT_IS_DOUBLE ? acos(a) : acosf(a))
#define CGFloatASin(a) (CGFLOAT_IS_DOUBLE ? asin(a) : asinf(a))
#define CGFloatATan(a) (CGFLOAT_IS_DOUBLE ? atan(a) : atanf(a))
@cbowns
cbowns / .gitconfig
Created July 23, 2014 17:54
A snippet of .gitconfig
# From my .gitconfig.
# Every time I use these, people get jealous.
[alias]
staged = diff --cached
unstaged = diff
list-staged = diff --staged --name-only
list-unstaged = diff --name-only
addp = add --patch
addi = add --interactive
amend = commit --amend --verbose