Skip to content

Instantly share code, notes, and snippets.

@dlintw
dlintw / wingo.PKGBUILD
Last active August 29, 2015 14:02
PKGBUILD for wingo-git
# Contributor: Andrew Gallant <andrew@burntsushi.net>
# Contributor: Daniel YC Lin <dlin.tw at gmail>
# Maintainer: Andrew Gallant
pkgname=wingo-git
pkgver=r421.8e0f2c8
pkgrel=1
pkgdesc="An X window manager featuring per-monitor workspaces with floating and tiling placement policies."
arch=(x86_64 i686)
url="https://github.com/BurntSushi/wingo"
license=('WTFPL')
@dlintw
dlintw / myupgrade_aur.sh
Created June 13, 2015 07:45
upgrade aur4 script
#!/bin/bash
readonly MYDIR=$PWD
PKGS=(
# java3d
# bvi
# xxdiff
# ccal
# tmux-mem-cpu-load-git
@dlintw
dlintw / gist:96799f668c78ba34570d
Created July 9, 2015 21:59
xbmc sample uboot.sh
# uboot.sh - TWPDA UBOOT modification for setting boot parameters
# Read TWPDA UBOOT logic http://www.twpda.com/2013/08/uboot-code.html
# hush script syntax http://www.stlinux.com/u-boot/using
# boot settings for sh4twbox install disk
# * bootargs: root=8:1 means sda1, sda2 8:2, sdb1 8:17, sdb2 8:18
# * bootcmd: 0:1 first usb parition, 0:2 2nd usb parition
setenv bootargs 'console=ttyAS0,115200 rootdelay=0 root=/dev/sda2 rootfstype=ext4 rw rootflags=data=journal nwhwconf=device:eth0,hwaddr:10:08:E2:12:06:BD phyaddr:0,watchdog:5000 mem=256M bigphysarea=2048'
#setenv bootcmd 'usbcfg 0; usb start; usb info; usb part; ext2load usb 0:1 80000000 vmlinux.ub; bootm 80000000'
@dlintw
dlintw / genymotionwithplay.txt
Last active August 30, 2015 14:36 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161892865 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
@dlintw
dlintw / sample.go
Created October 11, 2011 14:00
go tour #69
func Crawl(url string, depth, workerCnt int, fetcher Fetcher) {
reqch := make(chan int)
seen := make(map[string]bool)
working := make(chan bool, workerCnt)
var crawl func(string, int)
crawl = func(url string, depth int) {
defer func(){reqch <- -1}()
if depth <= 0 {
return
@dlintw
dlintw / a69.go
Created October 14, 2011 06:47
go tour #69 real fetcher
package main
import (
"bytes"
"os"
"fmt"
"html"
"http"
"io/ioutil"
"log"
@dlintw
dlintw / multifile.go
Created April 22, 2013 09:02
multi file read example code
package main
import (
"bufio"
"flag"
"fmt"
"time"
"log"
"io"
"os"
@dlintw
dlintw / cscope.sh
Created August 24, 2013 03:26
cscope for nextvod uboot source
mkdir -p cscope
FILE=$PWD/cscope/cscope.files
find "$PWD/src/" \
"$PWD/src/board/st/pdk7105" \
"$PWD/src/common" \
"$PWD/src/cpu/sh" \
"$PWD/src/cpu/sh/stx7105" \
"$PWD/src/disk" \
"$PWD/src/fs" \
"$PWD/src/include" \
@dlintw
dlintw / make.sh
Created August 30, 2013 13:38
nextvod uboot make script
#!/bin/bash
set -o errexit
# use make.sh <uboot_version> # if fossil not exist
UBOOT_VER=${1:-1}
if [ "$UBOOT_VER" == "1" -a -x /usr/bin/fossil -a -r manifest.uuid ] ; then
# use fossil version
_id=$(cat manifest.uuid 2>/dev/null)
UBOOT_VER=$(printf %u 0x${_id:0:6})
echo UBOOT_VER="$UBOOT_VER"
@dlintw
dlintw / nextvod kernel + busybox boot
Created September 15, 2013 15:50
uboot[a907] kernel[5ea7] rootfs[c1dd]
...
stm-ehci stm-ehci.1: USB 0.0 started, EHCI 1.00
usb usb3: configuration #1 chosen from 1 choice
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 1 port detected
stm-ohci stm-ohci.1: STMicroelectronics OHCI Host Controller
stm-ohci stm-ohci.1: new USB bus registered, assigned bus number 4
stm-ohci stm-ohci.1: irq 142, io mem 0xfeaffc00
usb usb4: configuration #1 chosen from 1 choice
hub 4-0:1.0: USB hub found