Skip to content

Instantly share code, notes, and snippets.

View sandinmyjoints's full-sized avatar
🏠
Working from home

William Bert sandinmyjoints

🏠
Working from home
View GitHub Profile
@sandinmyjoints
sandinmyjoints / init.el
Created September 18, 2012 15:55
Emacs init.el
;; -*- lexical-binding: t -*-
;;;; init.el
;;;; See: https://gist.github.com/3743892
;;; TODO:
;;; * Coffee-script etags.
;;; * Coffee-script compile and flymake.
;;; * swank.js:
;;; * https://github.com/Gozala/swank-js
@sandinmyjoints
sandinmyjoints / hack.sh
Created September 28, 2012 00:56 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@sandinmyjoints
sandinmyjoints / goodreads-oauth-example.py
Created October 11, 2012 01:41 — forked from gpiancastelli/goodreads-oauth-example.py
A Python example of how to use OAuth on GoodReads
import oauth2 as oauth
import urlparse
url = 'http://www.goodreads.com'
request_token_url = '%s/oauth/request_token/' % url
authorize_url = '%s/oauth/authorize/' % url
access_token_url = '%s/oauth/access_token/' % url
consumer = oauth.Consumer(key='Your-GoodReads-Key',
secret='Your-GoodReads-Secret')
#!/bin/bash
# Author:
# Email:
# Date: yyyy-mm-dd
# Usage: script.sh [-a|--alpha] [-b=val|--beta=val]
# Description:
#
#
#
@sandinmyjoints
sandinmyjoints / md.py
Created May 12, 2013 19:20
Quick and dirty Markdown script.
import sys
import markdown
USAGE = "%s <file.md> <css dir>" % __file__
TAIL = """
</body>
</html>
"""
# $ brew install https://raw.github.com/gist/1121425/rubberband.rb
require 'formula'
class Rubberband < Formula
homepage ''
url 'http://code.breakfastquay.com/attachments/download/35/rubberband-1.8.1-gpl-executable-osx-universal.tar.bz2'
version '1.8.1'
sha1 'bceba7dba8cdd773a318ca973ed9c5806be03262'
# Helpers.
_mp = ->
window.mixpanel ? null
redirect = ->
_redirect = ->
window.location.href = "#{host}/#users/new-profile"
null
# A little delay to ensure MP events are all sent. Setting this to 50 ms
@sandinmyjoints
sandinmyjoints / entrada-sample.coffee
Last active December 21, 2015 02:19
Account create success callback.
# Constants.
#
WAIT_BEFORE_REDIRECT = 300 # ms to wait before any redirect.
WAIT_AFTER_TRACK = 2000 # ms to wait for mp to acknowledge $signup event.
# Helpers.
#
redirect = (msg, error = false) ->
if error
logError msg
@sandinmyjoints
sandinmyjoints / control-madness.js
Created May 30, 2014 18:05
Control character causes socket hang up
var http = require("http");
var query = 'ningun';
http.get("http://127.0.0.1:2000/api/v1/dictionary?q=" + query + "&source=en", function(res) {
res.setEncoding('utf8');
var content = '';
res.on('data', function (chunk) {
console.log("res.on data");
content += chunk;
@sandinmyjoints
sandinmyjoints / public.md
Created October 15, 2014 21:32
public md

title

  • a
  • b