Skip to content

Instantly share code, notes, and snippets.

View quicksnap's full-sized avatar
🎮
GitHub has statuses?!

Dan Schuman quicksnap

🎮
GitHub has statuses?!
View GitHub Profile
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/0.10.24/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'pngquant-bin@0.1.5' ]
2 info using npm@1.3.21
3 info using node@v0.10.24
4 warn package.json fakeApp@0.0.0 No description
5 warn package.json fakeApp@0.0.0 No repository field.
6 warn package.json fakeApp@0.0.0 No README data
Error: [$rootScope:inprog] $apply already in progress
http://errors.angularjs.org/1.2.6/$rootScope/inprog?p0=%24apply
at http://127.0.0.1:9000/bower_components/angular/angular.js:78:12
at beginPhase (http://127.0.0.1:9000/bower_components/angular/angular.js:12208:15)
at Scope.$apply (http://127.0.0.1:9000/bower_components/angular/angular.js:12005:11)
at HTMLInputElement.<anonymous> (http://127.0.0.1:9000/scripts/app.js:31:15)
at HTMLInputElement.jQuery.event.dispatch (http://127.0.0.1:9000/bower_components/jquery/jquery.js:5095:9)
at HTMLInputElement.elemData.handle (http://127.0.0.1:9000/bower_components/jquery/jquery.js:4766:28)
at ctrl.select (http://127.0.0.1:9000/bower_components/angular-bootstrap/ui-bootstrap-tpls.js:3292:21)
at ctrl._selectActive (http://127.0.0.1:9000/bower_components/angular-bootstrap/ui-bootstrap-tpls.js:3309:14)
- name: check swapfile existence
file: path=/swapfile state=file
ignore_errors: True
register: swap_test
tags: swap
# Creates a 512MB Swapfile
- name: create swapfile
command: dd if=/dev/zero of=/swapfile bs=1024 count=512k
setupController: (controller, model) ->
store = @get('store')
controller.set 'currencies', store.find('currency').then (items)->
# Do some stuff here.
App.Currency = DS.Model.extend
country: DS.attr()
rate: DS.attr()
App.Store = DS.Store.extend
adapter: DS.ActiveModelAdapter.extend
namespace: 'api/v1'
@quicksnap
quicksnap / anagram.rb
Last active December 30, 2015 23:59
Faster!
#!/usr/bin/env ruby
file = File.open("/usr/share/dict/words")
def splitSortJoin(line)
line.chomp.split('').sort
end
line_map = {}
──> cat /Users/dan/bin/VirtualBoxFix ──(Fri,Dec06)─┘
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
VAGRANT_INV = "vagrant-inventory"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
singlenode config
# multinode config
---
# This is running on four hosts. ie:
# [webservers]
# myhost-A
# myhost-B
# myhost-C
# myhost-D
#
# myhost-C is not special.