This file contains 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
package main | |
import "net/http" | |
import "fmt" | |
import "io" | |
import "os" | |
//import "io/ioutil" | |
//starts an http server on :8000 | |
//allows a single file to be uploaded and a single file to be downloaded to the locations specified as arguments |
This file contains 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
package chat | |
import "net/http" | |
import "sync" | |
import "html/template" | |
import "time" | |
import "strings" | |
type chatpost struct{ | |
text string | |
when time.Time |
This file contains 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
#!/bin/sh | |
#compile it | |
msp430-elf-gcc -S $1 -o build.s | |
#remove all the crap gcc throws in, and initialize the stack (0x27f) & org (0xf800) | |
cat build.s | sed "s/\.text/\.org 0xf800/g" | sed "s/\.file/;\.file/g" | sed "s/\.balign/;\.balign/g" | sed "s/\.global/;\.global/g" | sed "s/\.size/;\.size/g" | sed "s/\.ident/;\.ident/g" |sed "s/\.L/L/g" |sed "s/main:/main:mov.w #0x27f, sp\n mov.w #0x5a80, &0x120;disable wdt/g" |sed "s/{/\n/g" >build2.s | |
#run main on reset | |
echo ".org 0xfffe" >> build2.s | |
echo " dw main" >> build2.s | |
#assemble it to out.hex |