Skip to content

Instantly share code, notes, and snippets.

View Soreil's full-sized avatar
🏠
Working from home

Sjon Kosse Soreil

🏠
Working from home
  • Netherlands
View GitHub Profile
@Soreil
Soreil / hideshower.go
Created January 1, 2016 22:42
Lovely little interface for Gtk.Bin embedders
type hideShower interface {
Hide()
Show()
IsVisible() bool
}
func toggle(h hideShower) {
if h.IsVisible() {
h.Hide()
} else {
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'
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
@Soreil
Soreil / discord.go
Created May 19, 2016 15:04
Discord name randomizer
package main
import (
"flag"
"fmt"
"log"
"math/rand"
"strings"
"time"
@Soreil
Soreil / main.go
Last active December 10, 2016 16:13
Advent of Code day 10
package main
import (
"fmt"
"strconv"
"strings"
"time"
)
type command struct {
@Soreil
Soreil / main.go
Created December 10, 2016 21:49
Advent of Code day whatever it was
package main
import (
"fmt"
"strings"
)
func main() {
lines := strings.Split(input, "\n")
var count int
@Soreil
Soreil / main.go
Created December 10, 2016 21:52
Advent of Code day 9
package main
import (
"fmt"
"strconv"
"strings"
)
func main() {
//fmt.Println(len(decode(input)))
@Soreil
Soreil / main.go
Created December 11, 2016 01:42
Advent of Code day 9
package main
import (
"fmt"
"strconv"
"strings"
)
func main() {
fmt.Println(decode(input))
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();