Skip to content

Instantly share code, notes, and snippets.

@xxxVxxx
xxxVxxx / gist:b8c3cd97d4e6823d0330
Last active August 29, 2015 14:20
vim74 govim neocomplete with lua5.1 ubuntu

####SETUP VIM with LUA support (needed for neocomplete)

sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common 
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo rm -rf /usr/local/share/vim

sudo rm /usr/bin/vim
sudo mkdir /usr/include/lua5.1/include
sudo mv /usr/include/lua5.1/*.h /usr/include/lua5.1/include/
@xxxVxxx
xxxVxxx / gist:3377d29a5cfa32246196
Last active August 29, 2015 14:22
python sqlalchemy mysql data dump in json format as required by datatables in this case
#!/usr/bin/python
'''
Install pip/sqlalchemy/mysqldb
sudo apt-get install python-pip
sudo apt-get install python-dev libmysqlclient-dev
pip install sqlalchemy
@xxxVxxx
xxxVxxx / README.md
Created February 4, 2016 16:02 — forked from jewzaam/README.md

##Yet another gist to provide Graphite support for Dashing Pull data from Graphite and present in Dashing. Support both graph and number widget.

Quick install:

dashing install 5088efcc94de2fecad5e

Set the graphite host/port and names of metrics in jobs/graphite.rb

@xxxVxxx
xxxVxxx / How to download streaming video
Created February 5, 2016 12:19 — forked from danfinlay/How to download streaming video.md
How to download a streaming video with Google Chrome
#How to download streaming video
Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.
##Open Developer Tools
From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:
1. (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@xxxVxxx
xxxVxxx / aws_usage.py
Created February 5, 2016 12:25 — forked from Bouke/aws_usage.py
Catch login failures / captcha input
#!/usr/bin/env python
"""
A script to query the Amazon Web Services usage reports programmatically.
Ideally this wouldn't exist, and Amazon would provide an API we can use
instead, but hey - that's life.
Basically takes your AWS account username and password, logs into the
website as you, and grabs the data out. Always gets the 'All Usage Types'
// get old
s3cmd get s3://elasticmapreduce/samples/spark/0.8.1/spark-0.8.1-emr.tgz
tar -xvf spark-0.8.1-emr.tgz
// get newer
curl "http://d3kbcqa49mib13.cloudfront.net/spark-1.0.0-bin-hadoop1.tgz" -o "spark-1.0.0-bin-hadoop1.tgz" # Grab the latest version of the prebuilt Spark jars. We grabbed Spark 1.0.0 with Hadoop 1 , spark-1.0.0-bin-hadoop1.tgz, from the Spark Downloads page
tar -xvf spark-1.0.0-bin-hadoop1.tgz
// old metrics properties files
@xxxVxxx
xxxVxxx / bootstrap_emr.tf
Created May 3, 2016 15:29 — forked from tsailiming/bootstrap_emr.tf
A terraform script to bootstrap EMR.
// EMR is not supported by terraform yet
// https://github.com/hashicorp/terraform/issues/2098
// This script will bootstrap the necessary VPC and related configs first.
provider "aws" {
#access_key = "ACCESS_KEY_HERE"
#secret_key = "SECRET_KEY_HERE"
region = "ap-southeast-1"
}
#latest release of veewee requires ruby > 2.1 and gem > 1.9
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
sudo apt-get install ruby2.3 ruby2.3-dev
#Lets setup veewee now:
git clone https://github.com/jedi4ever/veewee.git
cd veewee
@xxxVxxx
xxxVxxx / fix_github_https_repo.sh
Created June 17, 2016 08:06 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN