Skip to content

Instantly share code, notes, and snippets.

Sjon Kosse Soreil

Block or report user

Report or block Soreil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View arduino
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();
@Soreil
Soreil / main.go
Created Dec 11, 2016
Advent of Code day 9
View main.go
package main
import (
"fmt"
"strconv"
"strings"
)
func main() {
fmt.Println(decode(input))
@Soreil
Soreil / main.go
Created Dec 10, 2016
Advent of Code day 9
View main.go
package main
import (
"fmt"
"strconv"
"strings"
)
func main() {
//fmt.Println(len(decode(input)))
@Soreil
Soreil / main.go
Created Dec 10, 2016
Advent of Code day whatever it was
View main.go
package main
import (
"fmt"
"strings"
)
func main() {
lines := strings.Split(input, "\n")
var count int
@Soreil
Soreil / main.go
Last active Dec 10, 2016
Advent of Code day 10
View main.go
package main
import (
"fmt"
"strconv"
"strings"
"time"
)
type command struct {
@Soreil
Soreil / discord.go
Created May 19, 2016
Discord name randomizer
View discord.go
package main
import (
"flag"
"fmt"
"log"
"math/rand"
"strings"
"time"
View output current version
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
View .vimrc
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'
@Soreil
Soreil / hideshower.go
Created Jan 1, 2016
Lovely little interface for Gtk.Bin embedders
View hideshower.go
type hideShower interface {
Hide()
Show()
IsVisible() bool
}
func toggle(h hideShower) {
if h.IsVisible() {
h.Hide()
} else {
You can’t perform that action at this time.