Skip to content

Instantly share code, notes, and snippets.

View jeremywrowe's full-sized avatar
❤️
Coding

Jeremy W. Rowe jeremywrowe

❤️
Coding
View GitHub Profile
@jeremywrowe
jeremywrowe / pipe.rb
Created January 12, 2019 16:00
A light weight pipe implementation in ruby
#!/usr/bin/env ruby
class PipeNode
attr_writer :result
def initialize(value, chain)
@value = value
@chain = chain
@result = :unknown
end

Keybase proof

I hereby claim:

  • I am jeremywrowe on github.
  • I am jeremywrowe (https://keybase.io/jeremywrowe) on keybase.
  • I have a public key ASBqyp6W1b4t7Yb2OUNONUPaIbFd3fTaqEQA3ZqgpyrPiwo

To claim this, I am signing this object:

@jeremywrowe
jeremywrowe / fast-ember
Last active March 13, 2016 01:19
ember-cli - Improving TTA (Time To App)
#!/usr/bin/env ruby
require 'fileutils'
include FileUtils
template_dir = ARGV[0] or fail 'You must supply a template directory'
new_project_dir = ARGV[1] or fail 'You must supply a new project name'
template_dir = File.join(Dir.home, '.ember-cli-cache', template_dir)
fail "The template you are looking for does not exist '#{template_dir}'" unless File.exist? template_dir
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@jeremywrowe
jeremywrowe / Vagrantfile
Last active June 11, 2016 14:34 — forked from bbaaxx/Vagrantfile
Vagrantfile for a cheap ember-cli box (with NVM)
# -*- mode: ruby -*-
# vi: set ft=ruby :
box = 'ubuntu/trusty64'
hostname = 'emberclibox'
domain = 'example.com'
ip = '192.168.42.42'
ram = '1024'
$rootScript = <<SCRIPT
@jeremywrowe
jeremywrowe / ember.projections.json
Created September 18, 2015 23:30
Ember Projection for Projectionist Projects
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"import ApplicationAdapter from './application';",
"",
"export default ApplicationAdapter.extend({",
"",
"});"
],
@jeremywrowe
jeremywrowe / .vimrc
Created August 30, 2015 18:09
vim config
set nocompatible
set shell=/bin/bash
if filereadable(expand("~/.vimrc.bundles"))
source ~/.vimrc.bundles
endif
if (&t_Co > 2 || has("gui_running")) && !exists("syntax_on")
syntax on
endif
@jeremywrowe
jeremywrowe / .projections.json
Last active August 20, 2017 19:10 — forked from chantastic/.projections.json
ember-cli VIM projections
{
"app/adapters/*.js": {
"command": "adapter",
"template": [
"import ApplicationAdapter from './application';",
"",
"export default ApplicationAdapter.extend({",
"",
"});"
],
@jeremywrowe
jeremywrowe / ember-data-1.13-cheatsheet.md
Created August 17, 2015 17:00
Ember Data v1.13.x Cheatsheet

Ember Data v1.13.x Cheatsheet

Things to remember

  • If you return a promise beforeModel, model, and afterModel in a route, it will wait to resolve the promise before transitioning into the route. This is helpful when using loading and error substate templates.

  • All ember data records go into a global cache. There is not a cache per query,

@jeremywrowe
jeremywrowe / Brocfile.js
Last active August 29, 2015 14:19
Font-Awesomeness Brocfile.js
var EmberApp = require('ember-cli/lib/broccoli/ember-app'),
app = new EmberApp()
files = require('broccoli-static-compiler'),
trees = require('broccoli-merge-trees');
var fonts = files('./bower_components/fontawesome/fonts', {
srcDir: '/',
files: ['*'],
destDir: '/fonts'
});