Skip to content

Instantly share code, notes, and snippets.

Working from home

Ryan Haywood haywoood

Working from home
View GitHub Profile
haywoood / gist:4540930
Created Jan 15, 2013
Command to load postgres .dump file to local development db
View gist:4540930
turn this into a script
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U rhaywood -d flp_development latest.dump
View gist:4562294
"src_type":{"name" : "multi_page", "pages" : [0]},
View file_uploader.rb
class FileUploader < CarrierWave::Uploader::Base
require 'carrierwave/processing/mini_magick'
include CarrierWave::MiniMagick
storage :fog
version :thumb do
process :resize_first_page
process :convert => :jpg
haywoood / gist:4609046
Created Jan 23, 2013
Vegan burrito order from chipotle
View gist:4609046
Can I get a Burrito with cilantro lime rice, black beans, fajita vegetables, mild salsa, and extra guac.
serializer = DS.JSONSerializer.create()
serializer.configure 'App.Model',
sideloadAs: 'models'
App.RestAdaptor = DS.RESTAdapter.extend
serializer: serializer
App.Store = DS.Store.extend
adapter: App.RestAdaptor
window.App = Ember.Application.create
rootElement: '.solution_products_documents'
serializer = DS.JSONSerializer.create()
serializer.configure 'App.Document',
View product.hbs
<div class="row">
<div class="twelve columns">
<h2>{{title}} - Assets</h2>
<div class="row">
<div class="three columns">
{{#each assetTypes}}
{{#linkTo 'product.filter' this}}{{title}}{{/linkTo}}
View gist:5422503
100% of Global Fortune 100 companies trust VMware to power their virtualized environments, and more of those deployments run on HP infrastructure than any other platform.
To learn more about virtualization and cloud solutions from VMware and HP, please visit these websites.
<p><a href=""></a></p>
<p><a href=""></a></p>
<p><a href=""></a></p>
<p><a href=""></a></p>
<p><a href=""></a></p>
<p><a href=""></a></p>
View gist:6992375
(def primes
[2 3 5 7] (lazy-seq
(let [primes-from
(fn primes-from [n [f & r]]
(if (some #(zero? (rem n %))
(take-while #(<= (* % %) n) primes))
(recur (+ n f) r)
(lazy-seq (cons n (primes-from (+ n f) r))))) wheel(cycle[24246264246626 4 2 64684242486462 4 6
2 6 6 4 2 4 6 2 6 4 2 4 2 10 2 10])]
View gist:7015834
(ns bare.core
[clojure.string :as s :refer [join]]
[cljs.core.async :as async :refer [<! >! chan timeout put!]]
[dommy.utils :as utils]
[dommy.core :as dommy])
[dommy.macros :only [node sel sel1 deftemplate]])
(:require-macros [cljs.core.async.macros :as m :refer [go]]))
You can’t perform that action at this time.