Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / Material Design vanilla javascript tabs.markdown
Created October 8, 2015 05:42
Material Design vanilla javascript tabs
@anewusername1
anewusername1 / publisher.rb
Created August 17, 2011 15:24
Multicast pub/sub using rabbitmq, amqp, and bunny
require 'bunny'
b_con = Bunny.new(host: 'localhost', port: 5672, logging: true)
b_con.start
b_q = b_con.queue('events')
b_ex = b_con.exchange('events', type: :topic)
b_ex.publish('message!!', key: 'usermanager.user.login')
@veltman
veltman / premorph.js
Last active March 15, 2016 01:44
Morph pre-processing
var oldDistricts = require("./old-raw.geo.json"),
newDistricts = require("./new-raw.geo.json"),
_ = require("underscore"),
turf = require("turf"),
fs = require("fs");
// Clean up GeoJSON, sort districts in order
prep(oldDistricts);
prep(newDistricts);
@mbostock
mbostock / .block
Last active December 6, 2016 07:14
Graph Rollup
license: gpl-3.0
@lightyrs
lightyrs / Custom.css
Created December 17, 2012 08:26
My Chrome Dev Tools Skin incorporates the sleek visual style of codepen.io with some of my own usability enhancements. Pictured here with Monokai color scheme ( http://imgur.com/mbrqt ).
/*
Chrome Developer Tools - Monokai Color Theme
Author: Béres Máté Csaba / bjmatt.com / @bjmatt / beres.mate@bjmatt.com
-----------------------------------------------------------------------------------------------------------
Installation:
1. Find your Chrome's user stylesheets directory:
@phusick
phusick / hub.html
Created June 12, 2014 19:37
Event Hub
<html>
<head>
<title>Event Hub</title>
<script src="hub.js"></script>
<script>
var subscription = hub.subscribe('/go', function(params) {
console.log('one', params);
});
var subscription2 = hub.subscribe('/go', function(params) {
console.log('two', params);
@clayfreeman
clayfreeman / gnuize.sh
Last active October 3, 2018 06:14
GNU-ize Mac OS X El Capitan
#!/bin/bash
# Install required packages from Homebrew
brew tap homebrew/dupes
brew install coreutils binutils diffutils ed findutils gawk gnu-indent gnu-sed \
gnu-tar gnu-which gnutls grep gzip screen watch wdiff wget bash gdb gpatch \
m4 make nano file-formula git less openssh python rsync svn unzip vim \
--default-names --with-default-names --with-gettext --override-system-vi \
--override-system-vim --custom-system-icons
brew cleanup
@Atlas7
Atlas7 / rails_app_postgresql_local_mac_remote_heroku.md
Last active July 10, 2019 06:16
Notes - Ruby-on-Rails app / PostgreSQL database / testable locally on Mac / deployable remotely on Heroku

After some fiddling / experimenting with creating a Ruby-on-Rails (with a PostgreSQL database) that is testable locally on a mac, and also deployable remotely on Heroku, I thought it might be wise to jot down some notes just in case I forget how to repeat this again!

(Note: I'm not a pro in Ruby/Rails/Postgres just yet - this post is meant to be for my own "rescuing" purposes. I'd recommend you use the official Heroku Getting started with Ruby / Rails tutorial to begin with. Use this post only for additional info / resolving issues when you get stuck. I've included some handy links below).

# Useful Tutorials and Articles

Some really important tutorials / articles - highly recommend to use these frequently:

On installing Ruby, Rails, rbenv

@nisaacson
nisaacson / README.md
Last active December 9, 2019 01:17
Vim Javascript indentation via esformatter. Idea insired by http://yieldthedog.github.io/blog/2013/03/01/invoke-js-beautify-in-vim/