Skip to content

Instantly share code, notes, and snippets.

when :schedule
format = data_attributes[:format] || :object # either :object, :string, :compact
compact_pattern = /{([^\}]*)}/
to_api_val = lambda { |value|
case format
when :object
value
when :string
JSON.dump(value) rescue ""
" ========================================
" Vim plugin configuration
" ========================================
"
" This file contains the list of plugin installed using vundle plugin manager.
" Once you've updated the list of plugin, you can run vundle update by issuing
" the command :BundleInstall from within vim or directly invoking it from the
" command line with the following syntax:
" vim --noplugin -u vim/vundles.vim -N "+set hidden" "+syntax on" +BundleClean! +BundleInstall +qall
" Filetype off is required by vundle
  • Bruce Wayne, a.k.a. Batman
  • Clark Kent, a.k.a. Superman
  • Diana, Princess of Themyscira, a.k.a. Wonderwoman
  • Emil Blonsky, a.k.a. [Abomination]
  • Ferd, Melvin III, a.k.a. [The Toxic Avenger]
  • Grey, Jean, a.k.a. [Phoenix]
<!DOCTYPE html>
<html>
<head>
<script src='http://leafletjs.com/examples/us-states.js'></script>
<script src='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js'></script>
<link href='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css' rel='stylesheet' />
<style>
#map {
width: 800px;
height: 500px;
<!DOCTYPE html>
<html>
<head>
<script>
L_PREFER_CANVAS = true;
</script>
<script src='http://leafletjs.com/examples/us-states.js'></script>
<script src='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js'></script>
<link href='http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css' rel='stylesheet' />
<style>
<!DOCTYPE html>
<html>
<head>
<script>
L_PREFER_CANVAS = true;
</script>
<script src='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.js'></script>
<link href='http://cdn.leafletjs.com/leaflet-0.5.1/leaflet.css' rel='stylesheet' />
<!--[if lte IE 8]>
forbidden_countries: ['IR', 'SY', 'CU', 'SD', 'KP', 'MM']
" Use haml syntax for hamlc files
au BufRead,BufNewFile *.hamlc set ft=haml
$(".ajax-form").on "submit", (e) ->
e.preventDefault()
$this = $(this)
$target = $($this.data("elem-to-replace-with-response") or $this)
$(this).ajaxSubmit
target: $target
replaceTarget: true
false
# Shaft
function _quickshaft() {
shaft stop --all
if (( $# != 0)); then
shaft start $1
fi
}
alias ss=_quickshaft