Skip to content

Instantly share code, notes, and snippets.

View epogue's full-sized avatar
Caffeinated

Elliott Pogue epogue

Caffeinated
View GitHub Profile
Process: Docker [13957]
Path: /Applications/Docker.app/Contents/MacOS/Docker
Identifier: com.docker.docker
Version: 2.0.0.3 (31259)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Docker [13957]
User ID: 501
Date/Time: 2019-06-05 10:23:05.928 -0400
import Ember from 'ember';
export default Ember.Component.extend({
});
@epogue
epogue / .projections.json
Created November 18, 2015 13:40 — forked from jeremywrowe/.projections.json
ember-cli VIM projections
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"import ApplicationAdapter from './application';",
"",
"export default ApplicationAdapter.extend({",
"",
"});"
],
@epogue
epogue / app-template.rb
Created March 22, 2012 17:55
Rails 3 app template
require 'open-uri'
run "rm public/index.html"
run "rm .gitignore"
rake "db:migrate"
file ".gitignore", <<-CODE
#{URI.parse("https://raw.github.com/github/gitignore/master/Rails.gitignore").read}
*.sublime-workspace
CODE
# This is an incomplete implementation.
module NestedAttributes
extend ActiveSupport::Concern
module ClassMethods
def accepts_nested_attributes_for(*attr_names)
options = { :allow_destroy => false }
options.update(attr_names.extract_options!)
options.assert_valid_keys(:allow_destroy, :reject_if)
Bundler version 1.0.0
Ruby version 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
RVM version 1.0.1 with environment:
ruby-1.9.2-p0:
system:
uname: "Darwin Goliath.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386"
@epogue
epogue / Rails MongoMapper Template.rb
Created May 21, 2010 14:51 — forked from banker/Rails MongoMapper Template.rb
A Rails Template for MongoMapper geared towards Heroku's MongoHQ integration
# mongo_template.rb
# fork of Ben Scofield's Rails MongoMapper Template (http://gist.github.com/181842)
#
# To use:
# rails project_name -m http://gist.github.com/408924.txt
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
# remove unneeded defaults
run "rm public/index.html"
run "rm public/images/rails.png"
run "rm public/javascripts/controls.js"
run "rm public/javascripts/dragdrop.js"
run "rm public/javascripts/effects.js"
run "rm public/javascripts/prototype.js"
# add basic layout to start
file 'app/views/layouts/application.html.erb', <<HTML
/* Extend the Underscore object with the following methods */
// Rate limit ensures a function is never called more than every [rate]ms
// Unlike underscore's _.throttle function, function calls are queued so that
// requests are never lost and simply deferred until some other time
//
// Parameters
// * func - function to rate limit
// * rate - minimum time to wait between function calls
// * async - if async is true, we won't wait (rate) for the function to complete before queueing the next request
// swap the keybindings for paste and paste_and_indent
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }