Skip to content

Instantly share code, notes, and snippets.

Avatar

David Kelso zaius

  • Beyond Pricing
  • San Francisco
View GitHub Profile
@zaius
zaius / output.txt
Created Feb 19, 2016
Vagrant IPv6 Issue
View output.txt
$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Cloning VMware VM: 'hashicorp/precise64'. This can take some time...
==> default: Checking if box 'hashicorp/precise64' is up to date...
==> default: Skipping vmnet device verification, verify_vmnet is set to false.
==> default: Deleting the VM...
/Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:784:in `hostonly_config': undefined method `+' for nil:NilClass (NoMethodError)
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:706:in `block in call'
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:699:in `each'
from /Users/zaius/.vagrant.d/gems/gems/vagrant-vmware-fusion-4.0.6/lib/vagrant-vmware-fusion/action_farm.rb:699:in `call'
@zaius
zaius / verisign_certs.sh
Last active Oct 13, 2015 — forked from grahamlyons/verisign_certs.sh
Add missing Verisign certificates back into CA bundle on Ubuntu
View verisign_certs.sh
#!/bin/sh
CERT_PATH=/usr/local/share/ca-certificates/verisign.crt
write_certs() {
cat > $1 <<EOF
-----BEGIN CERTIFICATE-----
MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkG
A1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFz
cyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2
View components.my-component.js
import Ember from 'ember';
const {computed} = Ember;
export default Ember.Component.extend({
tagName: 'a',
_setupDropdown: Ember.on('didInsertElement', function() {
this._super.apply(this, arguments);
Ember.run.scheduleOnce('afterRender', this, function() {
View var is weird.js
var foo = 1;
var bar = 1;
(function() {
console.log(foo, bar)
var bar = 2
foo = 2
console.log(foo, bar)
})()
View keybase.md

Keybase proof

I hereby claim:

  • I am zaius on github.
  • I am davidkelso (https://keybase.io/davidkelso) on keybase.
  • I have a public key whose fingerprint is 2B2C 209F BCC0 BF21 4234 7292 7427 8BD5 9B48 8C48

To claim this, I am signing this object:

@zaius
zaius / deep.js.coffee
Created Apr 28, 2014
Deep hard link / copy
View deep.js.coffee
fs = require 'fs'
path = require 'path'
RSVP = require 'rsvp'
rimraf = require 'rimraf'
mkdirp = require 'mkdirp'
walkSync = require 'walk-sync'
# Passing in a srcDir allow us to know where the path should be relative to.
# This means we can autocreate subdirectories for all files.
exports.linkFiles = (files, srcDir, destDir) ->
@zaius
zaius / rage.txt
Created Apr 19, 2014
ruby and newlines
View rage.txt
zaius@pro:~$ irb
irb(main):001:0> (2 +
irb(main):002:1* 3)
=> 5
irb(main):003:0> (2
irb(main):004:1> +3)
=> 3
View runner.js.coffee
fs = require 'fs'
util = require 'util'
{spawn} = require 'child_process'
steps = []
# NOTE: can't use console to output as it's buffered.
log = (args...) ->
out = process.stdout.write args.join(' ') + '\n'
@zaius
zaius / post.js.coffee
Created Dec 3, 2013
Relationship mixin factory
View post.js.coffee
App.Post = App.Model.extend App.RelationshipMixinFactory('comments'),
comments: DS.hasMany('comment', async: true)
@zaius
zaius / handlebars.rb
Created Nov 20, 2013
Serving ember templates from rails
View handlebars.rb
# Put in config/initializers/handlebars.rb
# Add templates to app/assets/javascripts/templates/whatever.js.handlebars
# Then require from applicaiton.js (or any manifest) as usual. e.g.
# //= require_tree templates
class EmberHandlebars < Tilt::Template
def self.default_mime_type
'application/javascript'
end