Skip to content

Instantly share code, notes, and snippets.

View dav's full-sized avatar

Dav Yaginuma dav

View GitHub Profile
{
"name": "My Event",
"url": "http://example.com/",
"contact": "[email protected]",
"public": "no",
"dataVersion": "1",
"description": "<p>This is my example event</p>",
"background_image_url": "http://example.com/custom_bg.png",
"navbar_image_url": "http://example.com/custom_navbar.png",
"venues": [
{
"name": "AAAS 2010 Annual Meeting",
"url": "http://www.aaas.org/meetings/",
"description": " <b>President's Invitation</b> <p> AAAS President and Nobel Laureate Peter C. Agre invites you to join a diverse array of leading scientists, engineers, educators, and policy-makers at the association's 176th meeting. It will attract attendees from all U.S. states and territories as well as more than 50 countries. </p> <b>Program Update</b> <p>Our large interactive conference combines renowned plenary and topical speakers with three specialty seminars and 147 symposia across 13 tracks.</p> ",
"backgroundImageURL": "",
"navbarImageURL": "",
"venues": [
{
"venue": "Coronado (San Diego Marriott Hotel &amp; Marina)",
"description": "",
require 'rubygems'
require 'curb'
require 'fileutils'
SERVER = 'http://localhost:3000'
USERS_URL = SERVER+'/users'
PROFILES_URL = SERVER+'/profiles'
LOCAL_PICTURE_PATH = '/Users/dav/Pictures/111minna-2.jpg'
class MyProfile
Printing description of originalURL:
<CFURL 0x5cdcbf0 [0x2875380]>{type = 15, string = https://s3.amazonaws.com/yaginuma/uploads/profiles/0e0fd1a7533188a9eee49e9f9027ee3b/woman-28.jpeg, encoding = 134217984, base = (null)}
Printing description of requestHeaders:
<CFBasicHash 0x5cd9520 [0x2875380]>{type = mutable dict, count = 4,
entries =>
0 : <CFString 0x41f64 [0x2875380]>{contents = "If-None-Match"} = <CFString 0x5cddcf0 [0x2875380]>{contents = ""f39761819de451a831c6ab7ab4900c12""}
1 : <CFString 0x41ff4 [0x2875380]>{contents = "User-Agent"} = <CFString 0x5cdbb30 [0x2875380]>{contents = "DatingApp 1.0 (iPhone Simulator; iPhone OS 4.0.1; en_US)"}
5 : <CFString 0x41f74 [0x2875380]>{contents = "If-Modified-Since"} = <CFString 0x5cddd20 [0x2875380]>{contents = "Sat, 14 Aug 2010 05:53:45 GMT"}
6 : <CFString 0x42004 [0x2875380]>{contents = "Accept-Encoding"} = <CFString 0x41f54 [0x2875380]>{contents = "gzip"}
Here's just canada:
12 "calgary_alba_can"
3 "vancouver_bc_can"
3 "montreal_que_can"
2 "edmonton_alb_can"
1 "winnipeg_man_can"
1 "moose_jaw_sask_can"
1 "london_ont_can"
@dav
dav / gist:3738695
Created September 17, 2012 17:40
Script to copy photos/videos into iPhone Simulator
require 'etc'
require 'fileutils'
# Copies the most recent MAX_IMAGES photos/videos from the device image dir.
# I use Dropbox to sync my device images to my workstation disk
MAX_IMAGES=500
USER_HOME_DIR = Etc::getpwuid.dir
DEVICE_IMAGES_DIR="#{USER_HOME_DIR}/Dropbox/Camera Uploads"
SIMULATOR_IMAGES_DIR="#{USER_HOME_DIR}/Library/Application Support/iPhone Simulator/5.1/Media/DCIM/100APPLE"
@dav
dav / gist:4127922
Created November 21, 2012 21:32
scribble booty
CoreFoundation`-[NSMutableArray removeObject:]:
0x38266e0: pushl %ebp
0x38266e1: movl %esp, %ebp
0x38266e3: pushl %ebx
0x38266e4: pushl %edi
0x38266e5: pushl %esi
0x38266e6: subl $44, %esp
0x38266e9: calll 0x38266ee ; -[NSMutableArray removeObject:] + 14
0x38266ee: popl %ebx
0x38266ef: movl %ebx, -32(%ebp)
@dav
dav / tf-adhoc-build.sh
Created June 1, 2013 14:46
iOS build script that uploads to testflight and crittercism
set -e
# env vars to set outside of SCM:
#
# Testflight:
# TEAM_TOKEN
# API_TOKEN
#
# CRITTERCISM_KEY
# CRITTERCISM_SECRET
@dav
dav / gist:6125412
Created July 31, 2013 19:38
The .gitignore for tracking your Jenkins home dir into git
.owner
*.log
*.key
jobs/**/builds
jobs/**/lastStable
jobs/**/lastSuccessful
jobs/**/nextBuildNumber
log
plugins
*.bak
@dav
dav / gist:6125671
Last active December 20, 2015 11:48
unit testing
http://stackoverflow.com/questions/12557935/xcode-4-5-command-line-unit-testing
-----------
For the GUI prompt hanging UIAutomation:
http://stackoverflow.com/questions/9476131/is-there-a-way-to-remove-the-authorization-prompt-from-command-line-instances-of
the /etc/auth trick may not be enough,
see also
DevToolsSecurity -enable