Skip to content

Instantly share code, notes, and snippets.

@sysbot
sysbot / # emacs-plus - 2019-01-28_14-47-33.txt
Created January 28, 2019 22:51
emacs-plus (d12frosted/emacs-plus/emacs-plus) on macOS 10.14.3 - Homebrew build logs
Homebrew build logs for d12frosted/emacs-plus/emacs-plus on macOS 10.14.3
Build date: 2019-01-28 14:47:33
@sysbot
sysbot / introrx.md
Created November 29, 2018 07:51 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@sysbot
sysbot / bkup_dotfiles_configs.md
Created October 30, 2018 06:59 — forked from crazyhottommy/bkup_dotfiles_configs.md
How to rsync dot files and directories of remote server

backup dotfiles

  • 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/, using ncdu $HOME of similar tool.
  • Exclude all those large directories using rsync --exclude=.local --exclude=.cache format
  • 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
@sysbot
sysbot / ansible-summary.md
Created September 19, 2018 07:28 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@sysbot
sysbot / git-tag-delete-local-and-remote.sh
Created August 21, 2018 18:39 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@sysbot
sysbot / ffmpeg-livestream-to-youtube-vaapi-nvenc.md
Created August 19, 2018 23:33 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

  1. With Nvidia's NVENC:

Without scaling the output:

If you want the output video frame size to be the same as the input for Twitch:

ffmpeg -loglevel debug \

@sysbot
sysbot / bench.txt
Created August 16, 2018 04:19 — forked from rodaine/bench.txt
Code snippets for my blog post "The X-Files: Avoiding Concurrency Boilerplate with golang.org/x/sync"
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
Host bastion-*
ProxyCommand none
User bao
ForwardAgent yes
Tunnel no
SendEnv LANG LC_*
HashKnownHosts no
Compression yes
ServerAliveInterval 600
UserKnownHostsFile ~/.ssh/known_hosts

Keybase proof

I hereby claim:

  • I am sysbot on github.
  • I am sysbot (https://keybase.io/sysbot) on keybase.
  • I have a public key ASAVzKVs633NS414pz-lV1M3gM22eA6PlCQ0mLFrJHdSIAo

To claim this, I am signing this object:

@sysbot
sysbot / join_test.go
Created May 10, 2018 23:12
strings.Join vs fmt.Sprintf vs string concat (+)
package join
import (
"fmt"
"strings"
"testing"
)
var (
testData = []string{"a", "b", "c", "d", "e"}