Skip to content

Instantly share code, notes, and snippets.

@misfo
misfo / phoenix-global.js
Created January 22, 2018 18:38
phoenix.js 1.3 compiled to a global var
var Phoenix =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
didUpdateAttrs() { console.log('flash-container didUpdateAttrs', arguments); },
didReceiveAttrs() { console.log('flash-container didReceiveAttrs', arguments); },
willUpdate() { console.log('flash-container willUpdate', arguments); },
willRender() { console.log('flash-container willRender', arguments); },
didUpdate() { console.log('flash-container didUpdate', arguments); },
didRender() { console.log('flash-container didRender', arguments); },
fswatch -0 Gemfile.lock | while read -d "" lockfile; do BUNDLE_GEMFILE=$(echo $lockfile | sed 's/\.lock$//') bundle exec ruby -e 'puts $LOAD_PATH'; done
bundle show --paths | ruby -rjson -e 'STDIN.each_line {|l| print ",#{{path: l.chomp}.to_json}" }'
$ cd /tmp && mkdir wut && cd wut && echo 'v0.12.4' > .node-version && echo '{"devDependencies":{"ember-cli":"0.1.5"}}' > package.json && npm install && npm shrinkwrap
# ... snip ...
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/express requires debug@'~2.1.0' but will load
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/debug,
npm WARN unmet dependency which is version 2.2.0
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/morgan requires debug@'~2.1.0' but will load
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/debug,
npm WARN unmet dependency which is version 2.2.0
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/broccoli/node_modules/connect requires debug@'~2.1.0' but will load
npm WARN unmet dependency /private/tmp/wut/node_modules/ember-cli/node_modules/debug,
@misfo
misfo / gist:7aa0b4ffe523a6c994c6
Created February 12, 2015 22:19
Apply the working copy git changes from a remote server to local copy (I would never make changes on a server, I swear)
ssh tehawesome.example.com 'cd /the/app/dir && git diff' | git apply -
@misfo
misfo / scrape-sub-n-save.js
Created October 20, 2014 15:58
Scrape the Amazon Subscribe 'n' Save page w/ artoo.js
artoo.scrape('.subscriptions .subscription', {
name: function() {
return $.trim($(this).find('.productLink a').text());
},
price: function() {
var match = $(this).find('.priceInformation').text().match(/Current price:\s+\$(\d+\.\d+)/);
return match ? match[1] : '';
},
"interval in months": function() {
var match = $(this).find('.frequency').text().match(/every\s+(?:(\d)\s+)?month/);
Index: ext/openssl/ossl_pkey_ec.c
===================================================================
--- ext/openssl/ossl_pkey_ec.c (revision 44351)
+++ ext/openssl/ossl_pkey_ec.c (working copy)
@@ -757,8 +757,10 @@
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSL_NO_EC2M)
} else if (id == s_GF2m_simple) {
@misfo
misfo / gist:6829835
Created October 4, 2013 17:47
rake error when running in abstract_type repo
$ bundle exec rake --trace spec
rake aborted!
wrong number of arguments (2 for 0..1)
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/yardstick-0.9.6/lib/yardstick/rake/measurement.rb:52:in `initialize'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/devtools-58d3075f896e/tasks/metrics/yardstick.rake:24:in `new'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/devtools-58d3075f896e/tasks/metrics/yardstick.rake:24:in `block (2 levels) in <top (required)>'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/task_manager.rb:196:in `in_namespace'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/rake/dsl_definition.rb:104:in `namespace'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/bundler/gems/devtools-58d3075f896e/tasks/metrics/yardstick.rake:4:in `block in <top (required)>'
/Users/a912955/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/rake-10.1.0/lib/r
module Something
def somethings_method
end
class SomethingsConstant
end
end
extend Something