Skip to content

Instantly share code, notes, and snippets.

@kicool
kicool / rmsvn.sh
Created April 22, 2013 07:26
script: remove .svn on mac recursively
#!/bin/sh
echo "recursively removing .svn folders from"
pwd
rm -rf `find . -type d -name .svn`
package main
import "fmt"
func main() {
a := make([]int, 1, 100)
a[0] = 10
fmt.Printf("a:%v, &a[0] %p, &a %p\n\n", a, &a[0], &a)
b := append(a, 20)
@kicool
kicool / huaban.py
Created March 24, 2013 06:23 — forked from amoblin/huaban.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
# author: amoblin <[email protected]>
import sys, re, urllib2, os, urllib
beauty_url = "http://huaban.com/favorite/beauty/"
#beauty_url = "http://huaban.com/"
pin_re = '<a href="/pins/(.+?)/"'
@kicool
kicool / defer.go
Created January 24, 2013 09:47
show defer usage and get a more deep insight for "defer in for loop"
package main
import (
"fmt"
"log"
)
func bye(s string) {
log.Println("bye:", s)
}
@kicool
kicool / closure.go
Created January 24, 2013 00:10
closure problem when go routine and for are used together
// project
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i < 5; i++ {
@kicool
kicool / about.md
Created February 26, 2012 10:03 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer