csrutil disable
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
| # use ImageMagick convert | |
| # the order is important. the density argument applies to input.pdf and resize and rotate to output.pdf | |
| convert -density 90 input.pdf -rotate 0.5 -attenuate 0.2 +noise Multiplicative -colorspace Gray output.pdf |
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
| -- This is the Astricon Dangerous Demo application logic built in Lua, | |
| -- and conceived to be used in conjunction with the janus_lua.c plugin. | |
| -- It only uses data channels, and expects commands to control the ARI. | |
| -- | |
| -- Note: this example depends on lua-json to do JSON processing | |
| -- (http://luaforge.net/projects/luajson/) and on lua-http for HTTP | |
| -- requests (https://daurnimator.github.io/lua-http/) | |
| json = require('json') | |
| -- Example details |
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
| BenchmarkMutexCache/10-8 10000000 180 ns/op 0 B/op 0 allocs/op | |
| BenchmarkMutexCache/100-8 10000000 187 ns/op 0 B/op 0 allocs/op | |
| BenchmarkMutexCache/1000-8 10000000 214 ns/op 0 B/op 0 allocs/op | |
| BenchmarkMutexCache/10000-8 10000000 231 ns/op 0 B/op 0 allocs/op | |
| BenchmarkMutexCache/100000-8 5000000 254 ns/op 2 B/op 0 allocs/op | |
| BenchmarkMutexCache/1000000-8 1000000 1159 ns/op 102 B/op 1 allocs/op | |
| BenchmarkMutexCache/10000000-8 1000000 1481 ns/op 184 B/op 2 allocs/op | |
| BenchmarkMutexCache/100000000-8 1000000 1655 ns/op 187 B/op 3 allocs/op | |
| BenchmarkSyncMapCache/10-8 5000000 221 ns/op 0 B/op 0 allocs/op |
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
| (Dijkstra and plain A* are generally not included here as there are thousands of | |
| implementations, though I've made an exception for rare Ruby and Crystal versions, | |
| and for Thor, Mapzen's enhanced A*. ) | |
| A* Ruby https://github.com/georgian-se/shortest-path | |
| A* Crystal https://github.com/petoem/a-star.cr | |
| A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla | |
| NBA* JS https://github.com/anvaka/ngraph.path | |
| NBA* Java https://github.com/coderodde/GraphSearchPal | |
| NBA* Java https://github.com/coderodde/FunkyPathfinding |
- Following will copy all of dot
~/.files and directories (including its contents) directly underneath home directory. - To avoid copying cache and other local configs, e.g., that of web browser, java apps, etc., preferably query directory size tool under entire home
$HOME/, usingncdu $HOMEof similar tool. - Exclude all those large directories using
rsync --exclude=.local --exclude=.cacheformat - Avoid rsync password, ssh keys, .bash_history, etc. if you are uploading to github, etc.
- rsync home dotfiles and configs as follows:
# in your local machine
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" | |
| "io" | |
| "io/ioutil" | |
| "net/url" | |
| "github.com/benburkert/http" | |
| //"net/http" |
Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:
Considerations to take when live streaming:
The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:
-
Set the buffer size (
-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode. -
Set up the encoders as shown:
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
| # Borrowed from: | |
| # https://github.com/silven/go-example/blob/master/Makefile | |
| # https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
| BINARY = superdo | |
| VET_REPORT = vet.report | |
| TEST_REPORT = tests.xml | |
| GOARCH = amd64 | |
| VERSION?=? |