Skip to content

Instantly share code, notes, and snippets.

@mxcl
mxcl / uninstall_homebrew.sh
Created August 26, 2011 11:25
Uninstall Homebrew
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
@munhitsu
munhitsu / gist:1034876
Last active November 29, 2020 09:10
python 2.7.5 install on OSX (10.8+) using brew (pip, easy_install, virtualenv, virtualenvwrapper)
# In case you had some strange python installation
# NOTE: .pydistutils.cfg seems to be not compatible with brew install python
# areas I needed to clean before installation
# clean up ~/Library/Python
# clean up .local
# preconditions:
# xcode with command line tools installed
xcode-select --install
@breskeby
breskeby / build.gradle
Created June 13, 2011 00:24
Incremental test task execution on jenkins
apply plugin:'groovy'
repositories{
mavenCentral()
}
dependencies{
groovy "org.codehaus.groovy:groovy-all:1.7.10"
testCompile "junit:junit:4.8.2"
}
@lwe
lwe / brew-services.rb
Created January 5, 2011 13:13
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist.
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
require 'rubygems'
require 'spoon'
Spoon.spawnp 'jruby', *ARGV
from django.core.management.base import BaseCommand
class Command(BaseCommand):
option_list = BaseCommand.option_list
help = "Scans through the given app for faulty imports, or the entire project directory if no apps are specified"
args = '[appname ...]'
requires_model_validation = False
def import_statement_extractor(self, directory_path, python_file):
python_file = '%s/%s' % (directory_path, python_file)