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" | |
"log" | |
) | |
func check(err error) { | |
if err != nil { | |
log.Fatal(err) |
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
keys := make([]string, len(m)) | |
i := 0 | |
for k := range m { | |
keys[i] = k | |
i++ | |
} | |
sort.Strings(keys) |
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 ( | |
"reflect" | |
"testing" | |
) | |
func TestMath(t *testing.T) { | |
var tests = []struct { | |
input []int |
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
func Test{{THING}}(t *testing.T) { | |
var tests = []struct { | |
input string | |
expected string | |
}{ | |
{``, ``}, | |
} | |
for _, tt := range tests { | |
method := fmt.Sprintf(`{{THING}}(%#v)`, tt.input) |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5</title> | |
<link rel="stylesheet" href="css/styles.css?v=1.0"> | |
</head> | |
<body> | |
<p>Hello</p> | |
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
http://slackthemes.net/#/juice_bar | |
#86A34E ,#94AF63 ,#FFFFFF ,#6D8B42 ,#94AF63 ,#FFFFFF ,#FFB10A ,#DFA044 |
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
# Sublime PlainTasks https://github.com/aziz/PlainTasks | |
# ⌘-i : Add new task | |
# ⌘-[enter] : Add new task (alt) | |
# ⌘-d : Mark task done | |
# ⌘-[shift]-a : Archive completed tasks | |
# ⌘-[shift]-u : Open URL | |
# ⌘-r : Show projects | |
# [ctrl]-c : Cancel task | |
# [tab] : Insert date when between parens | |
# |
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
# EditorConfig is awesome: http://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true |
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
# Dump a schema to a .sql file | |
pg_dump -U postgres -s {{db}} > {{db}}.sql |
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
from django.utils.crypto import get_random_string | |
chars = 'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)' | |
get_random_string(50, chars) |
OlderNewer