Skip to content

Instantly share code, notes, and snippets.

View wndxlori's full-sized avatar

Lori M Olson wndxlori

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wndxlori on github.
  • I am wndxlori (https://keybase.io/wndxlori) on keybase.
  • I have a public key whose fingerprint is DB1C 4DD9 CA1A 0431 30F8 0B7F F2CC 5128 1A70 8FB4

To claim this, I am signing this object:

@wndxlori
wndxlori / gist:6942045
Created October 11, 2013 21:07
Problems with Cocoapods install
lori@Saphira ~/Dropbox/Projects/rails4ios
$ gem list
*** LOCAL GEMS ***
bundler (1.3.5)
bundler-unload (1.0.1)
rake (10.1.0)
rubygems-bundler (1.2.2)
rvm (1.11.3.8)
@wndxlori
wndxlori / gist:6596954
Created September 17, 2013 16:39
Weird RSpec model failure during my Rails 4 upgrade. Ideas?
def process!
self.transaction do
foo
bar
baz
boom
end
end
@wndxlori
wndxlori / Vagrant up
Created April 16, 2013 23:31
Trying out Vagrant with VMWare provider, and I get this ssh oddness in Capistrano cropping up AFTER the machine provisions (supposedly) perfectly. When I run this with my vagrant machine created with VirtualBox provider, it runs fine. What gives? Where is that bogus '\\' coming from?
$ vagrant up --provider=vmware_fusion
Bringing machine 'default' up with 'vmware_fusion' provider...
[default] Cloning VMware VM: 'precise-ruby'. This can take some time...
[default] Verifying vmnet devices are healthy...
[default] Preparing network adapters...
[default] Starting the VMware VM...
[default] Waiting for the VM to finish booting...
[default] The machine is booted and ready!
[default] Forwarding ports...
@wndxlori
wndxlori / deploy-failure
Created March 13, 2013 21:07
JRuby deploy failure
$ cap deploy:setup
LoadError: load error: openssl -- java.lang.NoClassDefFoundError: org/bouncycastle/asn1/DEREncodable
require at org/jruby/RubyKernel.java:1027
(root) at /Users/lori/.rvm/gems/jruby-1.7.2@rails3-bootstrap-devise-cancan/gems/net-ssh-2.6.6/lib/net/ssh/transport/openssl.rb:2
require at org/jruby/RubyKernel.java:1027
(root) at /Users/lori/.rvm/gems/jruby-1.7.2@rails3-bootstrap-devise-cancan/gems/net-ssh-2.6.6/lib/net/ssh/buffer.rb:1
require at org/jruby/RubyKernel.java:1027
(root) at /Users/lori/.rvm/gems/jruby-1.7.2@rails3-bootstrap-devise-cancan/gems/net-ssh-2.6.6/lib/net/ssh/buffer.rb:2
require at org/jruby/RubyKernel.java:1027
(root) at /Users/lori/.rvm/gems/jruby-1.7.2@rails3-bootstrap-devise-cancan/gems/net-ssh-2.6.6/lib/net/ssh/transport/algorithms.rb:1
@wndxlori
wndxlori / Gemfile
Created December 20, 2012 20:09
Recommended Jasmine setup for Rails 3.2
group :development, :test do
gem 'jasmine'
gem 'jasmine-phantom'
# Works with the asset pipeline
gem 'jasmine-jquery-rails'
end
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="../">Calgary FieldTrips</a>
<div class="nav-collapse" id="main-menu">
@wndxlori
wndxlori / bootstrap.rb
Created August 29, 2012 21:31 — forked from jamiepenney/bootstrap.rb
Form builder for Twitter Bootstrap v2 form elements
# This file goes in config/initializers
require 'bootstrap_form_builder'
# Make this the default Form Builder. You can delete this if you don't want form_for to use
# the bootstrap form builder by default
ActionView::Base.default_form_builder = BootstrapFormBuilder::FormBuilder
# Add in our FormHelper methods, so you can use bootstrap_form_for.
ActionView::Base.send :include, BootstrapFormBuilder::FormHelper
@wndxlori
wndxlori / beer_map_controller.rb
Created July 4, 2012 21:23
Custom image for MKAnnotationView in RubyMotion
ViewIdentifier = 'ViewIdentifier'
def mapView(mapView, viewForAnnotation:beer)
if view = mapView.dequeueReusableAnnotationViewWithIdentifier(ViewIdentifier)
view.annotation = beer
else
view = MKAnnotationView.alloc.initWithAnnotation(beer, reuseIdentifier:ViewIdentifier)
view.image = UIImage.imageNamed('signpost.png')
view.canShowCallout = true
# view.animatesDrop = true
button = UIButton.buttonWithType(UIButtonTypeDetailDisclosure)
@wndxlori
wndxlori / settings_view_controller.rb
Created July 4, 2012 17:12
RubyMotion with UILocalNotification
def setup_alarm_notification(for_day, with_switch)
alarm_date = App::Persistence[for_day]
alarm_is_set = App::Persistence[with_switch];
if (alarm_is_set && alarm_date && (alarm_date > Time.now))
local_notification = UILocalNotification.alloc.init
local_notification.fireDate = NSDate.dateWithString( alarm_date.to_s )
local_notification.alertBody = "Time to get up! #{alarm_date.strftime('%H:%M')}"
local_notification.soundName = UILocalNotificationDefaultSoundName
local_notification.applicationIconBadgeNumber = 1