Skip to content

Instantly share code, notes, and snippets.

View chrisforrette's full-sized avatar
🙃
Codesplodin'

Chris Forrette chrisforrette

🙃
Codesplodin'
View GitHub Profile
# Grab a Magento extension by the balls... I mean source.
wget http://connect.magentocommerce.com/core/get/Mage_Cybersource-1.1.2.tgz
@ericallam
ericallam / gist:1019446
Created June 10, 2011 18:35
How to log all queries for a PostgreSQL homebrew install on OS X

Open the postgresql.conf config file:

$> mate /usr/local/var/postgres/postgresql.conf

Uncomment the line with 'log_destination' and set it to 'syslog'

log_destination = 'syslog'

Open the syslog config:

@kylefox
kylefox / gist:4512777
Created January 11, 2013 18:15
If you want to use Xcode's FileMerge as your git mergetool, this is how you set it up.
# Tell system when Xcode utilities live:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
# Set "opendiff" as the default mergetool globally:
git config --global merge.tool opendiff
@willurd
willurd / web-servers.md
Last active November 13, 2024 13:44
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@justinabrahms
justinabrahms / gist:bdcbc7a2da010d7aff6e
Last active August 29, 2015 14:06
Choose a random, acceptable keg from John's Marketplace in Portland.
from pyquery import PyQuery
import requests
from random import choice
url = 'http://www.johnsmarketplace.com/Kegs/'
query = 'td table tr'
def main():

aws-cli bash helper functions

The official AWS command line tools, have support for configuration profiles. See Configuring the AWS Command Line Interface - Named Profiles.

Managing multiple profiles with the AWS CLI itself is relatively straight forward, switching between them with --profile flag on the command line or the AWS_PROFILE environment variable.

These helpers extend that functionality for convenience with other tools in the ecosystem.

aws-profile