Skip to content

Instantly share code, notes, and snippets.

View dblandin's full-sized avatar

devon blandin dblandin

View GitHub Profile
@dblandin
dblandin / Gemfile
Created August 15, 2013 17:45
Storing secure data with RubyMotion
source 'https://rubygems.org'
gem 'cocoapods', '~> 0.23.0'
gem 'motion-cocoapods', '~> 1.3.6'
class EventCell < UITableViewCell
IDENTIFIER = 'EventCell'
PADDING = 10
LEFT_MARGIN = 40
RIGHT_MARGIN = 20
attr_reader :event
def initWithStyle(style, reuseIdentifier: reuse_identifier)
super.tap do |cell|
@dblandin
dblandin / ui_image_view.rb
Created August 23, 2013 22:49
UIImageView with progress blocks
class UIImageView
def af_imageRequestOperation
@af_imageRequestOperation
end
def af_imageRequestOperation=(operation)
@af_imageRequestOperation = operation
end
def set_image_with_url(url)
module UIViewAdditions
def offsetPointToParentCoordinates(aPoint)
CGPointMake(aPoint.x + center.x, aPoint.y + center.y)
end
def pointInViewCenterTerms(aPoint)
CGPointMake(aPoint.x - center.x, aPoint.y - center.y)
end
def pointInTransformedView(aPoint)
@dblandin
dblandin / .env
Created January 19, 2014 19:06
Managing RubyMotion environment variables
TESTFLIGHT_APP_TOKEN=90210
TESTFLIGHT_TEAM_TOKEN=90210
TESTFLIGHT_API_TOKEN=90210
BUGSENSE_API_KEY=90210
BUGSENSE_API_TOKEN=90210
DEVELOPMENT_CERTIFICATE_NAME="iPhone Developer: yourName"
DEVELOPMENT_PROVISIONING_PROFILE_PATH="/path/to/development.mobileprovision"
@dblandin
dblandin / alerter.rb
Created February 10, 2014 21:26
RubyMotion Throttler *currently not working*
class Alerter
def alert(message)
NSLog("#{message}!")
end
end
@dblandin
dblandin / Rakefile
Last active June 17, 2016 15:30 — forked from ParkinT/Rakefile
RubyMotion Configuration and Deploy/Release
# -*- coding: utf-8 -*-
$:.unshift('/Library/RubyMotion/lib')
require 'motion/project/template/ios'
require 'bundler'
Dir.glob('./config/*.rb').each { |file| require file }
if ARGV.join(' ') =~ /spec/
Bundler.require :default, :development, :spec
elsif ARGV.join(' ') =~ /testflight/
@dblandin
dblandin / keybase.md
Created May 14, 2014 21:48
keybase.md

Keybase proof

I hereby claim:

  • I am dblandin on github.
  • I am devon (https://keybase.io/devon) on keybase.
  • I have a public key whose fingerprint is 3A7C 29B2 1C93 5467 19AD 78CE A4A7 70EF EE20 148C

To claim this, I am signing this object:

@dblandin
dblandin / Gemfile
Created May 25, 2014 21:42
Example RubyMotion app using the Routable gem with a Rails-like routes.rb file.
# Gemfile
source 'https://rubygems.org'
gem 'rake'
gem 'routable'
@dblandin
dblandin / mongo-world-2016-notes.md
Created June 30, 2016 15:26
MongoDB World 2016 Notes

MongoDB 🌎 2016 Notes

Tuesday, June 28th

Morning Keynote Session

Eliot Horowitz, CTO, MongoDB

Exciting features in MongoDB 3.4