Skip to content

Instantly share code, notes, and snippets.

@house9
Last active May 31, 2016 19:27
Show Gist options
  • Save house9/a2c94df59f9268c93f7a to your computer and use it in GitHub Desktop.
Save house9/a2c94df59f9268c93f7a to your computer and use it in GitHub Desktop.
------------
for own key, generator of params
------------
http://stackoverflow.com/questions/22001912/prettify-json-output-of-active-model-serializer-in-rails-console?answertab=active#tab-top
puts JSON.pretty_generate(FooSerializer.new(p).serializable_hash)
IO.write("tmp/x.json", JSON.pretty_generate(Foo.all.as_json))
----------
Rails.application.config.assets.paths
----------
<pre data-bind="text: ko.toJSON($data, null, 2)"></pre>
----------
localStorage.OFFLINE_SIMULATE = 'down';
Offline.checks.down()
Offline.checks.up()
----------
jQuery._data(elem, "events");
----------
git branch -l | grep foo/ | xargs git branch -D
git fetch --prune
----------
specify { expect(subject).to be_an_instance_of(described_class) }
----------
brew upgrade rbenv ruby-build
rbenv exec bundle
----------
# default for nvm
nvm alias default v5.9.1
# use .nvmrc file
nvm use
----------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment