Skip to content

Instantly share code, notes, and snippets.

@mortdeus
mortdeus / golang-generics
Created August 2, 2020 23:15
golang generic experiment
arst
https://go2goplay.golang.org/p/VpOVlHxlJNf
@mortdeus
mortdeus / chess.go
Created February 7, 2020 09:36
emoji chess
package main
import (
"fmt"
)
const printHistory = false // change this to true if you want to see every move printed out
// ♙ ♔ ♕ ♗ ♘ ♖ ♟ ♚ ♛ ♝ ♞ ♜
Welcome to Cloud Shell! Type "help" to get started.
Your Cloud Platform project in this session is set to spring-nova-229819.
Use “gcloud config set project [PROJECT_ID]” to change to a different project.
mortdeus@cloudshell:~ (spring-nova-229819)$ go test
can't load package: package .: no Go files in /home/mortdeus
mortdeus@cloudshell:~ (spring-nova-229819)$ sudo apt-get install libgmp-dev libssl-dev
********************************************************************************
You are running apt-get inside of Cloud Shell. Note that your Cloud Shell
machine is ephemeral and no system-wide change will persist beyond session end.
mortdeus
#8712
[10:59 PM] mortdeus: hey add me. im leaving the project to build a new block chain in Go (which has really good early wasn support)
[11:00 PM] OhGodAGuardian: ...
[11:00 PM] OhGodAGuardian: okay, that doesn't explain why you want me to add you?
[11:02 PM] mortdeus: because you dont need me to further explain to you what my points is when i discuss a problem i see
[11:03 PM] OhGodAGuardian: No, I'm waiting for you to further explain?
[11:03 PM] OhGodAGuardian: is also trying to get a server up
[11:06 PM] mortdeus: i just think you've got good taste
@mortdeus
mortdeus / interface_ptr.go
Last active August 29, 2015 14:19
go interface hackery
package main
import "fmt"
func main() {
s1, asc1 := FindAsc(1)
s2, asc2 := FindAsc(2)
s3, asc3 := FindAsc(3)
s4, asc4 := FindAsc(4)
@mortdeus
mortdeus / resume
Last active August 29, 2015 14:02
my resume
Experience: 5 years
Languages: Go, C, objC, C++, C#, D, Python, Java, Bash, Javascript, Dart
Skills: - expertise working with unix-like systems (linux, android, *bsd);
- concurrent and distributed system design
- experience working on low level code like kernels and compilers
- algorithm design and optimization
- ability to identify and debug complex, obscure bugs.
- writing elegant, simple & legible code; with plenty of comments
package main
import (
"bytes"
"encoding/xml"
"fmt"
"io"
"log"
"os"
"os/exec"
@mortdeus
mortdeus / walker.go
Created March 7, 2014 12:40
code that walks a file system directory hierarchy renaming a bunch of ugly ogg files I pulled from a server with wget.
package main
import (
"fmt"
"os"
"path/filepath"
)
func main() {
err := filepath.Walk(os.Getenv("PWD"), walk)
@mortdeus
mortdeus / Powered_By_Gophers_License
Created March 6, 2014 19:34
License for the "Powered By Gophers" buttons
The "Powered By Gophers" buttons were created by mortdeus and smw from the golang community.
These artworks are licensed under the Creative Commons Attribution 3.0 Unported License.
These designs were inspired by the golang gopher mascot created by Renee French.
Droid Font Family License:
Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the “License”);