Skip to content

Instantly share code, notes, and snippets.

kendellfab /
Created Jul 14, 2012
Bash script for changing version code and version name in an android manifest.
VERSIONCODE=`grep versionCode $MANIFEST_FILE | sed 's/.*versionCode="//;s/".*//'`
VERSIONNAME=`grep versionName $MANIFEST_FILE | sed 's/.*versionName="//;s/\.[0-9]*".*//'`
echo "Updating Android build information. New version code: $NEWCODE - New version name: $NEWNAME";
sed -i 's/versionCode *= *"'$VERSIONCODE'"/versionCode="'$NEWCODE'"/; s/versionName *= *"[^"]*"/versionName="'$NEWNAME'"/' $MANIFEST_FILE
kendellfab / GoPath Bin
Created Aug 1, 2013
Add this to $PATH variable to have multiple gopath bin directories.
View GoPath Bin
kendellfab / goto-sublime
Created Aug 1, 2013
Add mouse click `goto definition` in sublime text 3.
View goto-sublime
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
kendellfab / Apache Test
Created Aug 12, 2013
Example of using apache test tools to test server.
View Apache Test
ab -c 100 -n 10000 http://{your ip}:8000/
kendellfab / Typescript Comments
Created Aug 15, 2013
Sublime Text TypeScript commenting.
View Typescript Comments
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
kendellfab / golang-json-marshall
Created Aug 16, 2013
Handling custom Json marshalling in golang.
View golang-json-marshall
type Whatever struct {
someField int
func (w Whatever) MarshalJSON() ([]byte, error) {
return json.Marshal(struct{
SomeField int `json:"some_field"`
SomeField: w.someField,
kendellfab / golang-request
Created Aug 26, 2013
Golang Example for adding custom headers to a request.
View golang-request
client := &http.Client{]
req, err := http.NewRequest("POST", "", bytes.NewReader(postData))
req.Header.Add("User-Agent", "myClient")
resp, err := client.Do(req)
defer resp.Body.Close()
kendellfab / ejabberd_user
Created Sep 3, 2013
Register a new ejabberd user.
View ejabberd_user
sudo ejabberdctl register <username> <domain> <password>
kendellfab / fish_shell
Created Sep 5, 2013
Adding a list to a list in fish shell.
View fish_shell
set PATH $PATH {$GOPATH}/bin
kendellfab / arch_java.
Created Sep 19, 2013
Install Oracle java 7
View arch_java.
sudo pacman -R icedtea-web
Then build Oracle JRE AUR package,
Before installing OracleJRE I had to remove openjdk6 manually and ignore dependencies:
[argy@Freak jre]$ sudo pacman -Rdd openjdk6