Skip to content

Instantly share code, notes, and snippets.

View zigmoo's full-sized avatar

Jason Ziegler zigmoo

  • Memphis, Tennessee USA
  • 17:56 (UTC -05:00)
View GitHub Profile
@dhcole
dhcole / form.js
Created November 3, 2012 19:31
Submit data from html form to Google Doc Spreadsheet. Uses Bootstrap components for auto-complete region list and date selection.
$(function(){
var formUrl = '/* ex: https://docs.google.com/a/developmentseed.org/spreadsheet/formResponse?formkey=... */';
// Set up map
var m = mapbox.map('map').addLayer(mapbox.layer().id(' /* mapbox-account.id */ '));
// Set up map ui features with point selector
var ui = mapbox.ui().map(m).auto().pointselector(function(d) {
// Remove all points except the most recent
@michaelBenin
michaelBenin / gist:9181847
Created February 24, 2014 04:10
Python script to install Java, NodeJS, Ruby, Redis, NGINX, gem and npm packages, and git configuration
#!/usr/bin/env python
'''
This file is meant to setup your environment on AWS ec2 instance from a sample
config.json file.
'''
import os
import apt
import sys
@michaelBenin
michaelBenin / gist:4c068e050879dba4c19357be0f5dbd46
Created January 20, 2020 16:29
How to get Titan Key working on Ubuntu 16.04
# Found originally on: https://forum.mxlinux.org/viewtopic.php?t=53180
sudo apt update
sudo apt install libu2f-host0
sudo -v; wget https://github.com/Yubico/libu2f-host/raw/master/70-u2f.rules -O- | sudo tee /etc/udev/rules.d/70-yubico-u2f.rules
sudo udevadm control --reload-rules
sudo udevadm trigger
@michaelBenin
michaelBenin / psql-with-gzip-cheatsheet.sh
Created April 6, 2020 13:40 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@IamAdiSri
IamAdiSri / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Last active May 9, 2022 22:08 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@sente
sente / .gitmodules
Created June 27, 2014 15:33
git submodules for vim
[submodule ".vim/bundle/vim-pathogen"]
path = bundle/vim-pathogen
url = https://github.com/tpope/vim-pathogen.git
[submodule ".vim/bundle/delmitmate"]
path = bundle/delmitmate
url = git://github.com/Raimondi/delimitMate.git
[submodule ".vim/bundle/closetag"]
path = bundle/closetag
url = git://github.com/docunext/closetag.vim.git
[submodule ".vim/bundle/supertab"]
@sanchos2
sanchos2 / logging.py
Created December 28, 2020 15:39 — forked from kingspp/logging.py
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@pwenzel
pwenzel / git-log-to-tsv.sh
Created June 6, 2012 20:53
Git Log to Tab-Delimited CSV File
# Local Dates:
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt
# ISO Dates:
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt
@LeeHanYeong
LeeHanYeong / .gitignore
Created June 18, 2017 07:48
.gitignore(macOS, Python, Pycharm, Django, Linux)
.idea/
# Created by https://www.gitignore.io/api/macos,linux,django,python,pycharm
### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py