Skip to content

Instantly share code, notes, and snippets.

View dthyresson's full-sized avatar

David Thyresson dthyresson

View GitHub Profile
@dthyresson
dthyresson / ASO Rubymotion Config
Last active July 18, 2017 12:30
iOS Name AppStore Optimization in RubyMotion Config
Motion::Project::App.setup do |app|
app.name = 'Spogo - Sports. Predictions. Rewards.'
app.info_plist['CFBundleName'] = 'Spogo'
app.info_plist['CFBundleDisplayName'] = 'Spogo'
end
@dthyresson
dthyresson / init_restkit_logging
Created February 6, 2014 00:52
Getting RKLogConfigureByName working in RubyMotion
# http://www.pragmaux.com/post/42520342525/getting-rklogconfigurebyname-working-in-rubymotion
def init_restkit_logging
#define RKLogLevelOff -> RKlcl_vOff
#define RKLogLevelCritical -> RKlcl_vCritical
#define RKLogLevelError -> RKlcl_vError
#define RKLogLevelWarning -> RKlcl_vWarning
#define RKLogLevelInfo -> RKlcl_vInfo
#define RKLogLevelDebug -> RKlcl_vDebug
#define RKLogLevelTrace -> RKlcl_vTrace
@dthyresson
dthyresson / CW Specials Pigeon .markdown
Last active August 29, 2015 14:21
CW Specials Pigeon
@dthyresson
dthyresson / stattleship-api-cam-newton-td-feats.rb
Last active December 10, 2015 23:45
Example of fetching Cam New Football TD Feats from the Stattleship API in Ruby
#!/bin/ruby
require 'awesome_print'
require 'csv'
require 'dotenv'
require 'httparty'
require 'hashie'
require 'highline'
require 'link_header'
@dthyresson
dthyresson / nba_team_game_log_retrieval.R
Created January 12, 2016 15:07 — forked from batpigandme/nba_team_game_log_retrieval.R
Get all of the game logs for the NBA teams without pre-loading team information.
#########################################################################
## Get NBA Team Game Logs From the Stattleship API
#########################################################################
## install and load the stattleshipR package
devtools::install_github("stattleship/stattleship-r")
library(stattleshipR)
## set API token
set_token('YOUR_ACCESS_TOKEN')
@dthyresson
dthyresson / optimize_png.txt
Created February 3, 2016 23:45
Optimize PNGs
brew install optipng pngquant advancecomp
Optimize the PNGs like this:
pngquant --verbose --speed=1 --quality=0-100 INPUT.png -o OUPUT.png
optipng -o7 FILE.png
advpng -z -4 FILE.png
advdef -z -4 FILE.png
@dthyresson
dthyresson / csv_to_json.rb
Created December 14, 2016 17:26 — forked from enriclluelles/csv_to_json.rb
CSV to JSON
#!/usr/bin/env ruby
require 'csv'
require 'json'
if ARGV.size != 2
puts 'Usage: csv_to_json input_file.csv output_file.json'
puts 'This script uses the first line of the csv file as the keys for the JSON properties of the objects'
exit(1)
end
@dthyresson
dthyresson / keybase.md
Last active February 1, 2017 20:26
Keybase Public Identity

Keybase proof

I hereby claim:

  • I am dthyresson on github.
  • I am dthyresson (https://keybase.io/dthyresson) on keybase.
  • I have a public key ASDRhvK6wBdEfm3oekD3Ru6FNHxtZ7-_TNdhsniO31hYYwo

To claim this, I am signing this object:

@dthyresson
dthyresson / US Zip Codes from 2013 Government Data
Created August 31, 2017 19:30 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@dthyresson
dthyresson / _Netlify_Edge_Handler_Analytics_Redirect_Idea.md
Last active May 28, 2020 13:36
Spark! Netlify Edge Handler Idea: Analytics + Redirect aka Let's mashup Bit.ly + Segment!