Skip to content

Instantly share code, notes, and snippets.


Iñaki Abete inakiabt

View GitHub Profile
yanirs / import-parse-class.js
Created Jan 15, 2015
PhantomJS script for importing collection dumps to
View import-parse-class.js
* PhantomJS script for importing collection dumps to
* Usage: phantomjs --ssl-protocol any import-parse-class.js <configFile> <dumpFile> <collectionName>
* Parameters:
* - configFile: path of a JSON file with contents:
* {
* "email": <Parse user email>,
* "password": <Parse user password>,
ambakshi /
Last active Oct 4, 2020
Assume an IAM role. An interesting way of doing IAM roles is to give the instance permissions to assume another role, but no actual permissions by default. I got this idea while setting up security monkey:
# Assume the given role, and print out a set of environment variables
# for use with aws cli.
# To use:
# $ eval $(./
DaveHudson / Grunt-Installr
Created Jul 11, 2014
Grunt.js + Installr API
View Grunt-Installr
module.exports = function(grunt) {
// Project configuration.
pkg: grunt.file.readJSON('package.json'),
installr_settings: {
titanium: {
build_ios: { // build for ios first
View Vagrantfile
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# = "ubuntu-12.04-docker"
config.vm.box_url = ""
# Sets the ip we'll use to access the box :private_network, ip: ""
config.vm.hostname = "myapp"
tonylukasavage / app.js
Created Jun 2, 2014
Inject environment variables into Titanium. Makes shared code easier to manage (no more sanitizing keys in repos). Uses Titanium to encrypt the values.
View app.js
// now you can use it in a titanium app
View .bash_profile
find-up() {
local path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
if [ "$path" != "" ]
echo "$path"
patrickhammond /
Last active Nov 3, 2020
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"
satyadeepk /
Last active Apr 27, 2016
Drain logs to a file
# Restartes the parse log if it crashes
# stdbuf flushes the Parse log buffer so they come in real time
until stdbuf -oL /usr/local/bin/parse log -f > info.log; do
echo "Parse log crashed with exit code $?. Respawning.." >&2
sleep 1
DanHerbert /
Last active Nov 30, 2020
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

READ THIS Very Important Update

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

You can’t perform that action at this time.