Replace [your key] with your key ID
To obtain your key ID
gpg --list-secret-keys --keyid-format LONGWhich returns something like
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
| Working with DOM | Working with JS | Working With Functions |
|---|---|---|
| Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
| Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
| Create DOM Elements | Conditionals |
| namespace :haml do | |
| desc "Convert HAML templates to ERB" | |
| task :convert_to_erb do | |
| # Assumes you have faraday in your Gemfile | |
| conn = Faraday.new(url: "https://haml2erb.org") do |f| | |
| f.request :json | |
| f.response :json | |
| end | |
| haml_filenames = Dir["app/views/**/*.haml"] |
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| @token = '' | |
| def list_files | |
| ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago | |
| params = { | |
| token: @token, |
| # A class-based template for jQuery plugins in Coffeescript | |
| # | |
| # $('.target').myPlugin({ paramA: 'not-foo' }); | |
| # $('.target').myPlugin('myMethod', 'Hello, world'); | |
| # | |
| # Check out Alan Hogan's original jQuery plugin template: | |
| # https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template | |
| # | |
| (($, window) -> |
| #!/usr/bin/env bash | |
| uninstall() { | |
| list=`gem list --no-versions` | |
| for gem in $list; do | |
| gem uninstall $gem -aIx | |
| done | |
| gem list | |
| gem install bundler | |
| } |
| Ruby Editor: | |
| data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| Autofocus textarea: | |
| data:text/html, <textarea style="font-size: 1em;font-family:'Lucida Console';width: 100%; height: 100%; border: none; outline: none" autofocus /> |
| # Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences. | |
| # Instructions: | |
| # Go to TextMate > Preferences... | |
| # Click Advanced | |
| # Select Folder References | |
| # Replace the following: | |
| # File Pattern |