~/Downloads $ wget https://mega.co.nz/sdk.zip &>/dev/null
~/Downloads $ unzip sdk.zip
Archive: sdk.zip
inflating: readme.txt
inflating: megabdb.cpp
inflating: megacli.cpp
inflating: megaclient.cpp
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
#!/bin/bash | |
die_usage() { | |
if [ ! -z "${*}" ]; then | |
echo "ccl: error: ${*}" 1>&2 | |
echo | |
fi | |
echo "usage: ccl <review id> <commit>" 1>&2 | |
echo " ccl <commit range>" 1>&2 | |
exit 1 |
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 dbgutil | |
import ( | |
"os" | |
"runtime" | |
"strings" | |
) | |
func stacktrace(max int) []string { | |
pc, stack := make([]uintptr, max), make([]string, 0, max) |
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" | |
"sort" | |
) | |
type T string | |
func rm(t []T, idx []int) []T { |
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 ( | |
"compress/flate" | |
"compress/gzip" | |
"compress/lzw" | |
"compress/zlib" | |
"fmt" | |
"io" | |
"os" |
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" | |
"math/rand" | |
"os" | |
"strconv" | |
"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" | |
"io" | |
"math/rand" | |
"os" | |
"strconv" | |
"text/template" | |
"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
=== RUN TestScheduler-8 | |
0: *scheduler.BarEvent=*scheduler.BarEvent: {Level=1, Priority=4} | |
1: *scheduler.BarEvent=*scheduler.BarEvent: {Level=4, Priority=6} | |
2: *scheduler.BarEvent=*scheduler.BarEvent: {Level=4, Priority=0} | |
0: *scheduler.FooEvent=*scheduler.FooEvent: {Level=4, Priority=4} | |
3: *scheduler.BarEvent=*scheduler.BarEvent: {Level=2, Priority=7} | |
1: *scheduler.FooEvent=*scheduler.FooEvent: {Level=4, Priority=3} | |
4: *scheduler.BarEvent=*scheduler.BarEvent: {Level=1, Priority=6} | |
2: *scheduler.FooEvent=*scheduler.FooEvent: {Level=0, Priority=1} | |
5: *scheduler.BarEvent=*scheduler.BarEvent: {Level=3, Priority=6} |
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
skinparam { | |
monochrome true | |
defaultFontName Consolas | |
defaultFontSize 12 | |
noteBackgroundColor #C0C0C0 | |
noteFontName Courier | |
sequenceBoxBackgroundColor #EEEEEE | |
sequenceLifeLineBackgroundColor #DDDDDD | |
} |
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
#!/usr/bin/env bash | |
# | |
# Usage: | |
# | |
# ~ $ gorelease linux:windows 386:amd64 github.com/rjeczalik/bin/cmd/gobin | |
# ~/src/github.com/rjeczalik/bin/cmd/gobin $ gorelease linux:windows 386:amd64 | |
die() { | |
if [ ! -z "${*}" ]; then | |
echo "gocross: ${*}" 1>&2 |
OlderNewer