waitForSelector(want, opts={}) =>
new Promise (resolve, reject) =>
return resolve node if node = document.querySelector want
find = new MutationObserver (changes) =>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| N A M Operator(s) Description | |
| - - - ----------- ----------- | |
| 1 R Y ! ~ + boolean NOT, bitwise complement, unary plus | |
| (unary plus may be redefined from Ruby 1.9 with +@) | |
| 2 R Y ** exponentiation | |
| 1 R Y - unary minus (redefine with -@) | |
| 2 L Y * / % multiplication, division, modulo (remainder) | |
| 2 L Y + - addition (or concatenation), subtraction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env coffee | |
| fs = require 'fs' | |
| fp = require 'path' | |
| EventEmitter = require 'events' | |
| class Watcher extends EventEmitter | |
| constructor: (globs, cb) -> | |
| super() | |
| @watch globs, cb if globs?.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { ServiceProvider } = require '@adonisjs/fold' | |
| AdonisMongoose = require 'mongoose' | |
| module.exports = class MongooseProvider extends ServiceProvider | |
| register: -> | |
| @app.singleton 'Adonis/Addons/AdonisMongoose', => | |
| Config = @app.use 'Adonis/Src/Config' | |
| mongoHost = Config.get 'mongo.host', '127.0.0.1' | |
| mongoPort = Config.get 'mongo.port', '27017' | |
| mongoDb = Config.get 'mongo.db' , 'test' |
I hereby claim:
- I am shreeve on github.
- I am shreeve (https://keybase.io/shreeve) on keybase.
- I have a public key ASBI8x-VoitCK6fVsyz0tNSu4A-NsuCh6ri6I1-p1t0gXAo
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby -E binary | |
| # alias lscleanup="/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user && killall Finder" | |
| apps = {} | |
| uses = {} | |
| text = %x{`locate lsregister` -dump} | |
| rows = text.split('-' * 80); rows.shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu-debootstrap:14.04 | |
| # Nodejs needed for ruby asset pipeline | |
| RUN apt-get update -y \ | |
| && apt-get install -y \ | |
| curl \ | |
| libpq-dev \ | |
| && curl -sSL https://deb.nodesource.com/setup_0.12 | bash - \ | |
| && apt-get install -y nodejs \ | |
| && apt-get autoremove -y \ |
- https://gist.github.com/elabs-dev/41c27fdb0a007ad4cac6
- https://gist.github.com/shreeve/bffc05490347e8b62575 - FFI version of binding_of_caller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # ============================================================================= | |
| # UPDATE as of June 15, 2015: See the bindings gem at: | |
| # | |
| # https://rubygems.org/gems/bindings | |
| # ============================================================================= | |
| # ============================================================================= | |
| # Quick proof-of-concept of an Fiddle-based binding_of_caller (no compiling!) |