This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ai | |
set backspace=2 " (bs) allow backspacing over everything in insert mode | |
set expandtab | |
set foldmethod=indent | |
set hidden | |
set history=50 " (hi) keep 50 lines of command line history | |
set ignorecase | |
set incsearch | |
set laststatus=2 | |
set list listchars=tab:>-,trail:.,extends:>,precedes:< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT table_schema, table_name FROM information_schema.columns WHERE column_name LIKE '%name%'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
import uuid | |
class UUIDField(models.CharField): | |
""" | |
A field which stores a UUID value in hex format. This may also have | |
the Boolean attribute 'auto' which will set the value on initial save to a | |
new UUID value (calculated using the UUID1 method). Note that while all | |
UUIDs are expected to be unique we enforce this with a DB constraint. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if exists('+autochdir') | |
set autochdir | |
else | |
autocmd BufEnter * silent! lcd %:p:h:gs/ /\\ / | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From http://navaneethkn.wordpress.com/2010/12/19/simple-egg-timer-on-linux-for-pomodoro-technique/ | |
#!/bin/bash | |
counter=0 | |
limit=$1 | |
summary=$2 | |
startmessage=$3 | |
endmessage=$4 | |
notify-send -u critical -i appointment -t 600 "$summary" "$startmessage" | |
echo | |
while [ $counter != $limit ]; do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"surround visual selection with paired characters of your choice | |
vnoremap _( <ESC>`>a)<ESC>`<i(<ESC> | |
vnoremap _" <ESC>`>a"<ESC>`<i"<ESC> | |
vnoremap _' <ESC>`>a'<ESC>`<i'<ESC> | |
vnoremap _{ <ESC>`>a}<ESC>`<i{<ESC> | |
vnoremap _[ <ESC>`>a]<ESC>`<i[<ESC> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datacommons=> select * from tmp_fec_total_receipts where total_itemized_contributions > total_individual_contributions limit 15; | |
candidate_id | committee_id | candidate_name | chamber | total_receipts | total_individual_contributions | total_itemized_contributions | last_summary_date | |
--------------+--------------+-------------------------+---------+----------------+--------------------------------+------------------------------+------------------- | |
H0AR01125 | C00480905 | SMITH, PRINCELLA D | H | 477.27 | 57.26 | 420.00 | 2012-12-31 | |
H0AR02149 | C00477380 | ADAMS, JOHN | H | 730.71 | 0.00 | 730.00 | 2011-10-15 | |
H0AZ03305 | C00468686 | HULBURD, JON | H | 13500.00 | 0.00 | 13500.00 | 2012-03-31 | |
H0AZ04501 | C00485995 | PENA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
//please requist your app token from | |
//https://trello.com/1/connect?key=yourkey&name=git-hook&expiration=never&response_type=token&scope=read,write | |
var key = "your key"; | |
var token = "your token"; | |
//https://trello.com/board/-/4e9003324a517dad44465056 | |
var board_id = "4e9003324a517dad44465056"; | |
var Trello = require("node-trello"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Sample template to bring up Puppet Master instance that can be used to bootstrap and manage Puppet Clients. The Puppet Master is populated from an embedded template that defines the set of applications to load. **WARNING** This template creates one or more Amazon EC2 instances. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters": { | |
"InstanceType": { | |
"Description": "EC2 instance type for PuppetMaster", | |
"Type": "String", | |
"Default": "t1.micro", | |
"AllowedValues": [ | |
"t1.micro", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This is the user-data script for EC2. It still didn't work as a user-data script, | |
# but once uploaded to the new server and then executed, it worked. | |
set -e -x | |
EC2_HOSTNAME=<put master hostname here> | |
export DEBIAN_FRONTEND=noninteractive | |
hostname $EC2_HOSTNAME | |
echo $EC2_HOSTNAME > /etc/hostname | |
wget https://apt.puppetlabs.com/puppetlabs-release-precise.deb | |
dpkg -i puppetlabs-release-precise.deb |
OlderNewer