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 provides a way to chope a place, once choped, other guys have | |
// to wait till it's available. chope is slang for reserved | |
package main | |
import ( | |
"fmt" | |
"sync" | |
"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
pi@waripi ~ $ ab -n 1000 -n 10000 http://192.168.1.244:8000/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 192.168.1.244 (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests | |
Completed 4000 requests |
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
// See this running @ http://play.golang.org/p/PN7GapMy3q | |
package main | |
import "fmt" | |
func main() { | |
你好 := "Hello" | |
world := "世界" | |
问好(你好, world) |
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
# Easy to use downloader Rakefile | |
# Add as many URLs you want in a file called download | |
# Requires youtube-dl - http://rg3.github.com/youtube-dl/ | |
# | |
# echo URL >> download | |
# rake hq | |
# | |
# If you use a different source file, then run as follows: | |
# | |
# rake SOURCEFILE=some_other_file.txt |
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 ruby | |
# encoding: utf-8 | |
# x264 presets guide : https://forum.handbrake.fr/viewtopic.php?f=6&t=19426 | |
X264 = "b-adapt=2:rc-lookahead=50:me=umh:bframes=5:ref=6:direct=auto:trellis=2:subq=10:psy-rd=1.0,0.10:analyse=all" | |
FORMAT = "--optimize --format mp4" | |
QUALITY = "--ab 64 --mixdown mono --quality 23 -e x264 -x '#{X264}'" | |
SIZE = "--width 1280 --height 720" | |
ARGV.each do |param| |
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
~ % cat bdsmtest.sh | |
#!/usr/bin/env bdsm | |
modules array | |
my_array=(1 2 3 4) | |
echo ${my_array[@]} | |
array_shift my_array | |
echo ${my_array[@]} | |
~ % ./bdsmtest.sh | |
1 2 3 4 |