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
type hideShower interface { | |
Hide() | |
Show() | |
IsVisible() bool | |
} | |
func toggle(h hideShower) { | |
if h.IsVisible() { | |
h.Hide() | |
} else { |
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
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'fatih/vim-go' | |
Plugin 'majutsushi/tagbar' | |
Plugin 'scrooloose/nerdtree' |
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
We are live: received from fallback channel, but are still live | |
We aren't live: received from fallback channel and timed out already | |
We actually received music!: Received from stream channel | |
As we can see, we always fail after one "we are live" statement. | |
Turning the fallback timeout up to 100x increases it to two we are live messages. | |
So original fallback timeout is a bit too agressive most likely. | |
2016/03/11 20:56:18 Listening on :8005 | |
2016/03/11 20:56:18 We aren't live |
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 ( | |
"flag" | |
"fmt" | |
"log" | |
"math/rand" | |
"strings" | |
"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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"strings" | |
"time" | |
) | |
type command struct { |
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 ( | |
"fmt" | |
"strings" | |
) | |
func main() { | |
lines := strings.Split(input, "\n") | |
var count int |
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 ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func main() { | |
//fmt.Println(len(decode(input))) |
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 ( | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func main() { | |
fmt.Println(decode(input)) |
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
const uint8_t wireIn = 14; | |
const uint8_t wireOut = 15; | |
int timer1_counter = 0; | |
int timer = 0; | |
void setup() | |
{ | |
pinMode(wireIn, INPUT); | |
pinMode(wireOut, OUTPUT); | |
noInterrupts(); |