Recently, I got my hands on a Raspberry Pi and one of the first things I wanted to do with it was to turn it into my complete AVR development environment. As part of that I wanted to make avrdude be able to program an AVR directly from the Raspberry Pi with no programmer. I know there is this linuxgpio programmer type that was recently added, but it is so recent that it isn’t yet included in the repos and it also requires a compile-time option to enable it. I noticed that the Raspberry Pi happens to expose its SPI interface on its expansion header and so I thought to myself, “Why not use this thing instead of bitbanging GPIOs? Wouldn’t that be more efficient?” Thus, I began to decipher the avrdude code and write my addition. My hope is that things like this will allow the Raspberry Pi to be used to explo
We need to patch Go's source code to allow cgo when cross-compiling and make Android-specific changes since it sometimes differs from linux (e.g.: it doesn't use /etc/resolv.conf for DNS config)
- Clone the go source:
hg clone -u release https://code.google.com/p/go - Enter the go source directory:
cd go - Apply the patch in this gist:
patch -p1 < /path/to/patch/go_android.patch - Enter the go/src directory:
cd src
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| setlocal | |
| :: EXAMPLE: | |
| :: set GOPATH=c:\gopath1;c:\gopath2 | |
| :::::::: meat :::::::: | |
| set GOROOT=%~dp0 |
Code by minux, source via: http://play.golang.org/p/kLtct7lSUg via: https://groups.google.com/d/msg/golang-nuts/fG8hEAs7ZXs/tahEOuCEPn0J
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x00 0x0000 []byte{0x0} | |
| 0x01 0x0001 []byte{0x1} | |
| 0x02 0x0002 []byte{0x2} | |
| 0x03 0x0003 []byte{0x3} | |
| 0x04 0x0004 []byte{0x4} | |
| 0x05 0x0005 []byte{0x5} | |
| 0x06 0x0006 []byte{0x6} | |
| 0x07 0x0007 []byte{0x7} | |
| 0x08 0x0008 []byte{0x8} | |
| 0x09 0x0009 []byte{0x9} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function throbber() | |
| { | |
| local rs="${1-\n}" | |
| gawk ' | |
| BEGIN {RS="'"$rs"'"; ORS=RS; s="/-\\|"} | |
| {print $0} | |
| NR%100==0 {printf(substr(s,(NR/100)%4+1,1)"\b") > "/dev/stderr"} | |
| NR%1000==0 {printf(".") > "/dev/stderr"} | |
| END{print "" > "/dev/stderr"} | |
| ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: Homepage: https://gist.github.com/akavel/5102393 | |
| :: Author: (c) 2013 by Mateusz Czaplinski | |
| :: License: MIT/X11 | |
| if "%1"=="clone" goto :clone | |
| if "%1"=="show-ref" goto :showref | |
| if "%1"=="checkout" goto :checkout | |
| goto :unknown | |
| :clone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: "Make Go" v1.06 2013-02-22 | |
| :: Tool for easy building Go (http://golang.org) programs out of the | |
| :: main %GOPATH% tree. | |
| :: SOURCE: https://gist.github.com/3713260 | |
| :: | |
| :: TODO: | |
| :: - add subcommands, especially: install, clean (rmdir /q /s _gopath) | |
| :: - add info that when importing, you must prefix with current dir name | |
| :: OTHER IDEAS: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- compact/one-line form (note: all strings in '', so you can run it with: lua -e "..." ) | |
| s=' 01234567 89abcdef\n' for y=0,0xf0,0x10 do s=s..('%02x '):format(y) for x=0,0xf do s=s..string.char(y+x):gsub('%c','.') if x==7 then s=s..' ' end end s=s..(' %02x\n'):format(y) end print(s) | |
| -- expanded/pretty-printed form | |
| s=' 01234567 89abcdef\n' | |
| for y=0,0xf0,0x10 do | |
| s=s..('%02x '):format(y) | |
| for x=0,0xf do | |
| s=s..string.char(y+x):gsub('%c','.') | |
| if x==7 then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Copyright 2011 Maximilian Herkender | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |