Skip to content

Instantly share code, notes, and snippets.

(test_env)fmilomacbook:master fmilo$ trial buildbot.test
buildbot
test ... [ERROR]
===============================================================================
[ERROR]
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twisted/trial/runner.py", line 677, in loadByNames
things.append(self.findByName(name))
File "/usr/local/Cellar/python/2.7.2/lib/python2.7/site-packages/twisted/trial/runner.py", line 487, in findByName
@Mistobaan
Mistobaan / how_to_remove_brew.txt
Created January 20, 2012 05:46
How to remove brew
# how to remove brew
cd `brew —-prefix`
rm -rf Cellar
brew prune
rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew
rm -rf ~/Library/Caches/Homebrew
class MetadataResource(ModelResource):
class Meta:
queryset = MetadataModel.objects.all()
resource_name = 'metadata'
allowed_methods = ['get', 'post', 'put', 'delete']
filtering = {
'adcode': ALL,
'status': ALL,
'first_run_date': ['exact', 'lt', 'lte', 'gte', 'gt'],
}
package main
package main
import ("flag"
"net/http"
"net/url"
"os"
"io"
"log"
@Mistobaan
Mistobaan / example.go
Created May 16, 2012 21:49
Async Http Download
package main
import ("flag"
"net/http"
"net/url"
"io"
"log"
"io/ioutil"
"sync"
)
@Mistobaan
Mistobaan / dump_stack.go
Created June 8, 2012 00:45
How To dump the StackTrace When Receiving a SIGQUIT signal
// Thanks to zeebo on #go-nuts
package main
import (
"os"
"os/signal"
"runtime"
"syscall"
)
func buffer(in <-chan T) <-chan T {
out := make(chan T)
go func() {
var buf = list.New()
for {
outc := out
var v T
if buf.Len() == 0 {
// buffer empty: don't try to send on output
if in == nil {
@Mistobaan
Mistobaan / script.sh
Created June 28, 2012 23:33
Convert Apple keys to openssl certificates
#!/bin/bash
set -e
if [[ $# -lt 2 ]]
then
echo "Usage: $0 <filename.p12> <key-name: ie. app-free-dev>"
exit
fi
@Mistobaan
Mistobaan / build_gcc4.7.1.sh
Created August 18, 2012 04:39 — forked from henry0312/build_gcc4.7.1.sh
Build GCC 4.7.1 on Mac OS X Lion with Go support
#!/bin/sh
# GCC
## Prerequisites for GCC
## http://gcc.gnu.org/install/prerequisites.html
## Installing GCC: Configuration
## http://gcc.gnu.org/install/configure.html
GCC_VER=4.7.1
WORK_DIR=$HOME/Builds/GCC
@Mistobaan
Mistobaan / tee.go
Created November 26, 2012 00:40 — forked from earino/tee.go
Tee not quite right
package main
import (
"io"
"bufio"
"os"
"flag"
"log"
)