Skip to content

Instantly share code, notes, and snippets.

caelifer

Block or report user

Report or block caelifer

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 align.go
package main
import (
"fmt"
)
func main() {
fmt.Println("Sz", "Pg", "Bn", "Pad")
pageSize := 1 << 5
for _, off := range []int{10, 15, 16, 31, 33} {
View functional.go
package main
import (
"fmt"
"strings"
)
func main() {
strs := StringSlice{"Hello", "foo", "bar"}
ints := IntSlice{1, 2, 3, 4}
View palindrome.go
package main
import (
"fmt"
"unicode"
"golang.org/x/text/unicode/norm"
)
func main() {
View line_reader.go
package main
import (
"bufio"
"encoding/json"
"fmt"
"log"
"strings"
)
View hanoi.go
package main
import (
"fmt"
"time"
)
const height = 5
func main() {
View progress_indicator.go
package main
import (
"fmt"
"time"
)
func main() {
// marks := []rune{0x25F7, 0x25F6, 0x25F5, 0x25F4}
// marks := []rune{0x25CB, 0x25D4, 0x25D1, 0x25D5, 0x25CF, 0x25C9, 0x25CE}
View .gitconfig
[alias]
lg1 = log --graph --abbrev-commit --decorate --date=relative --pretty=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim yellow) - %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --date=relative --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%C(reset)'
lg = !"git lg1"
co = checkout
ci = commit
stat = status
sync-master = "!git checkout master && git fetch upstream && git reset --hard upstream/master"
sync-branch = "!git fetch upstream && git merge upstream/master"
[push]
View lonely_integer.go
// This is a solution implemented in Go (golang.org) for the "lonely integer" problem
// as presented here:
//
// https://www.hackerrank.com/contests/master/challenges/lonely-integer
//
package main
import (
"bufio"
View scope_indentation.go
package main
import (
"fmt"
"strings"
)
// Global scope level
var scope = new(ScopeLevel)
View mrrobot_morse_code.go
package main
import (
"encoding/base64"
"fmt"
"log"
)
type MorseChar string
You can’t perform that action at this time.