Skip to content

Instantly share code, notes, and snippets.

@kasperite
kasperite / postgres-brew.md
Created February 6, 2019 07:34 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@kasperite
kasperite / tricky gems installation
Last active February 7, 2019 23:22
Terminal commands
# install nokogiri when libxml2 is not found
gem install nokogiri -v 1.8.5 -- --use-system-libraries --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/libxml2/
# install nokogiri with just system lib
gem install nokogiri -v 1.8.5 -- --use-system-libraries
# libv8
gem install libv8 -v '3.16.14.15' -- --with-system-v8
# therubyracer
[
{
"title":"Northland",
"icon": {
"iconSize": [30,30],
"className": "circle",
"html": "★"
},
"coordinates":[
-35.585851,
{
"2014-2015" : {
"Northland" : {
"total" : 28,
"population" : 168300
},
"Waitemata" : {
"total" : 63,
"population" : 575600
},
{
"2011-2012": [
{
"group": "5-9",
"male": 1,
"female": 0,
"total": 1
},
{
"group": "10-14",

Here's what you get.

Some CoffeeScript (verbosely commented for clarity)

# Override Rails handling of confirmation

$.rails.allowAction = (element) ->
  # The message is something like "Are you sure?"
  message = element.data('confirm')
@kasperite
kasperite / dabblet.css
Created November 21, 2012 08:02
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f12;
background: linear-gradient(45deg, #f06, yellow);
min-height: 50%;