Skip to content

Instantly share code, notes, and snippets.

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'tpope/vim-rails'
Plugin 'vim-ruby/vim-ruby'
Plugin 'tpope/vim-sensible'
Plugin 'Shougo/Unite.vim'
Plugin 'Shougo/neomru.vim'
Plugin 'alols/vim-pro'
@slotrans
slotrans / lambda_test_harness.js
Created December 27, 2014 21:01
Local test harness for AWS Lambda functions. I'm no JS programmer so this is probably horrible in some way or other, but it does appear to work. Note that this does NOT directly simulate the permissions of the function's execution role. It will run with whatever permissions belong to the AWS credentials you use, unless you run it on an EC2 insta…
var fs = require('fs');
// Lambda knows what region it's in but a local execution doesn't, so preload the SDK and set the region
// This will only work if the same variable name is used in the Lambda function file
var AWS = require('aws-sdk');
AWS.config.update({region: 'us-east-1'});
// validate arguments
if(process.argv.length < 4) {
@bbengfort
bbengfort / venv_cheat_sheet.md
Created August 20, 2014 14:16
My virtualenv and virtualenv wrapper cheat sheet. I alias the commands of virtualenv and virtualenv wrapper for my own development environment.

Ben's VirtualEnv Cheatsheet

This cheat sheet describes my usage/implementation of virtualenv with virtualenv wrapper and the bash foo that I added with the help of many blogs to make it all tick together in fun land.

Quick Reference

$ echo $WORKON_HOME
/Users/benjamin/.virtualenvs

$ echo $PROJECT_HOME
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active February 25, 2025 22:09
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active July 10, 2025 04:46
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@dexafree
dexafree / CoordDownloader.py
Created May 24, 2014 13:29
Script utilizado para descargar las coordenadas de todas las paradas de FGC y añadirlas a una base de datos SQLite. Extrae los datos en un archivo llamado SQL.txt
# -*- coding: utf-8 -*-
import urllib2
from bs4 import BeautifulSoup
# Array de todas las lineas de FGC
linies = ['l6', 'l7', 's1', 's2', 's5', 's55', 's8', 's33', 's4', 's8', 'r5', 'r50', 'r6', 'r60']
# Creamos el opener y le añadimos los headers
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
@patrickhammond
patrickhammond / android_instructions.md
Last active July 22, 2025 02:25
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@timw4mail
timw4mail / GetSet.php
Created April 16, 2014 19:51
Trait for naive getter/setter methods
<?php
/**
* Trait to get rid of naive getter/setter boilerplate
*/
trait GetSet
{
/**
* Dynamically create getters/setters
@archie
archie / ddd_cqrs_es.md
Last active May 20, 2019 07:36
Draft blog post about ddd, cqrs, and es.

DDD, CQRS and Event Sourcing

In preparation for a new gig I'm reading up on the terms Domain-Driven Design, Command-Query Responsibility Segregation, and Event Sourcing. Here are a list of useful texts and talks that I've discovered so far. If anything is missing please leave a comment.

DDD

@jfarcand
jfarcand / ngrep_hack.md
Last active May 29, 2018 18:07
Fixing broken ngrep with OS X Mavericks

Migrating to OS X Mavericks breaks the ngrep utility. Doing:

sudo ngrep -d lo0 -q -W byline port 8080

stopped working where the process exits immediately. I didn't dig into the ngrep code, but was able to find a simple workaround by doing

sudo ngrep -q -W byline -d lo0 '' 'port 8080'

You can call that a lazy hack, but it work!