Skip to content

Instantly share code, notes, and snippets.

@jmoe
jmoe / database.yaml
Created July 22, 2014 22:10
Venture Scanner
development:
adapter: postgresql
encoding: unicode
database: vsondemand_dev
host: localhost
port: 5432
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
@jmoe
jmoe / index.html
Last active August 29, 2015 14:03
Earthquakes from Maptime
<!DOCTYPE html>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-properties {
border-collapse:collapse;
font-size:11px;
@jmoe
jmoe / download_kickstarted
Created August 14, 2013 18:49
download kickstarter
var getVidDetails = document.querySelector('#video-section>.video-player');
if(getVidDetails){
var getShareUl = document.querySelector('#about ul');
var downButtLi = document.createElement('li');
downButtLi.setAttribute('style','margin:6px -9px !important;width: 80px;');
var downButtA = document.createElement('a');
@jmoe
jmoe / rabl_init.rb
Created August 21, 2012 18:36
Pretty print JSON from RABL
class PrettyJson
def self.dump(object)
JSON.pretty_generate(object, {:indent => " "})
end
end
# config/initializers/rabl_init.rb
Rabl.configure do |config|
# Commented as these are defaults
# config.cache_all_output = false
@jmoe
jmoe / erb2haml.sh
Created March 24, 2012 02:09
Convert erb to haml
for i in `find app/views -name '*.erb'` ; do html2haml -e $i ${i%erb}haml ; rm $i ; done
# Licensed to libcloud.org under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# libcloud.org licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software