This file contains hidden or 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
ffmpeg -i test.mov \ | |
-pix_fmt yuv420p \ | |
-vcodec libx264 \ | |
-vf scale=640:-1 \ | |
-acodec aac \ | |
-vb 1024k \ | |
-minrate 1024k \ | |
-maxrate 1024k \ | |
-bufsize 1024k \ | |
-ar 44100 \ |
This file contains hidden or 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 account | |
import ( | |
"errors" | |
) | |
type CheckingAccount struct { | |
balance int | |
} |
This file contains hidden or 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" | |
) | |
func main() { | |
// runtime.GOMAXPROCS(2) | |
ch := make(chan int) |
This file contains hidden or 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" | |
"os" | |
"strconv" | |
) | |
type Cycle struct{} |
This file contains hidden or 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" | |
type Greeter struct{} | |
func (p *Greeter) greet(s string) { | |
fmt.Printf("Hello, %s!\n", s) | |
} |
This file contains hidden or 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" | |
"unicode" | |
) | |
// expandTitle turns a string like NewYork into New York by finding a capital | |
// letter and inserting a space. | |
func camelToTitle(name string) string { |
This file contains hidden or 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" | |
type T struct{ X int } | |
func inc1(t *T) { | |
t.X++ | |
} |
This file contains hidden or 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
java_binary( | |
name = "ProjectRunner", | |
srcs = glob([ | |
"src/main/java/foo/bar/baz/*.java", | |
"src/main/java/foo/bar/baz/domain/*.java" | |
]), | |
deps = [ | |
"@javax_json_javax_json_api//jar", | |
"@org_glassfish_javax_json//jar", | |
], |
This file contains hidden or 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
type byTitleArtist []*Track | |
func (t byTitleArtist) Len() int { return len(t) } | |
func (t byTitleArtist) Swap(i, j int) { t[i], t[j] = t[j], t[i] } | |
func (t byTitleArtist) Less(i, j int) bool { | |
if toL(t[i].Title) < toL(t[j].Title) { | |
return true | |
} | |
if toL(t[i].Title) > toL(t[j].Title) { | |
return false |
This file contains hidden or 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
var tracks = []*Track{ | |
{Title: "Ready To Go", Artist: "Republica", Album: "Republica", Year: 1996, Length: length("5m01s")}, | |
{Title: "Go", Artist: "Lizzo", Album: "Lizzobangers", Year: 2014, Length: length("3m45s")}, | |
{Title: "Go Get It", Artist: "Slowdive", Album: "Slowdive", Year: 2017, Length: length("6m09s")}, | |
{Title: "You Gotta Go!", Artist: "The Mighty Mighty Bosstones", Album: "A Jackknife to a Swan", Year: 2002, Length: length("2m43s")}, | |
{Title: "Go Out", Artist: "Blur", Album: "The Magic Whip", Year: 2015, Length: length("4m41s")}, | |
{Title: "Just Let Go", Artist: "Fischerspooner", Album: "Odyssey", Year: 2005, Length: length("4m15s")}, | |
{Title: "Go It Alone", Artist: "Beck", Album: "Guero", Year: 2005, Length: length("4m09s")}, | |
{Title: "I Let Go", Artist: "Eighteen Visions", Album: "Obsession", Year: 2004, Length: length("3m23s")}, |