Skip to content

Instantly share code, notes, and snippets.

@taesiri
taesiri / layout_2x4.json
Created October 30, 2019 05:08
i3_layout_2by4
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
@taesiri
taesiri / layout_4x2.json
Last active October 30, 2019 05:09
i3_layout_4by2
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"layout": "splith",
"percent": 0.5,
"type": "con",
"nodes": [
@taesiri
taesiri / layout.json
Last active October 30, 2019 03:39
layout_2by2
{
"layout": "splitv",
"percent": 0.5,
"type": "con",
"nodes": [
{
"name": "Agent1",
"percent": 0.5,
"type": "con",
"swallows": [ {"class": "BipedalWalker"}]
@taesiri
taesiri / config
Created October 29, 2019 00:20
default i3 config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
@taesiri
taesiri / ffmpeg-desktop-livestreaming-nvenc-and netcat.md
Created October 25, 2019 23:59 — forked from Brainiarc7/ffmpeg-desktop-livestreaming-nvenc-and netcat.md
This gist will show you how to livestream your Linux desktop to a client via FFMpeg using a GPU-accelerated video encoder (NVENC and VAAPI-based)

Low-Latency Live Streaming for your Desktop using ffmpeg and netcat:

Preamble:

In this post I will explore how to stream a video and audio capture from one computer to another using ffmpeg and netcat, with a latency below 100ms, which is good enough for presentations and general purpose remote display tasks on a local network.

The problem:

Streaming low-latency live content is quite hard, because most software-based video codecs are designed to achieve the best compression and not best latency. This makes sense, because most movies are encoded once and decoded often, so it is a good trade-off to use more time for the encoding than the decoding.

@taesiri
taesiri / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created October 25, 2019 23:59 — 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:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@taesiri
taesiri / id_rsa.pub
Created October 1, 2019 10:54
Publickey
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGnbCNw2cQF4zNbupJUuSucymhuomi1Mo+PGidZuAAUHP5r5blgPvkUfCw/Y6WDtuwq1nEGUn0oaNbdCMNaYEKgqZn9X7msMbdTWKXgI8mW+bJZoESnEVJ++cfdxRDU0aXtikRmm+VSjLOhSrKx+P4Rh2dmM+XdFTcu3nsoS3QNuGBacRLyZCHSPe5o0unBI5B565ZKUvXwI/hq8nkRHk7E5rvD+X1748wslUjYPnQrHjPTQ97OSgcnyIqDFN7Ziz20/Q9f67+Y0TZUhuZqAQuJaH3QtLxlx/OlCh5jo2N3UPXqGbT7s5LHB8+4JoaMqiB419Xs7pYt0tNlHqMS4VN
#
# This is a little script to populate Firefox Sync with
# fake password records. Use it like so:
#
# $> pip install PyFxA syncclient cryptography
# $> python ./upload_fake_passwords.py 20
#
# It will prompt for your Firefox Account email address and
# password, generate and upload 20 fake password records, then
# sync down and print all password records stored in sync.
@taesiri
taesiri / common_and_latin_name.json
Created January 3, 2019 09:51 — forked from itdaniher/common_and_latin_name.json
common_and_latin_name.json
{
"7 Pot Brain Strain Red Pepper": "Capsicum Chinense",
"7 Pot Bubble Gum Pepper": "Capsicum Chinense",
"7 Pot Pepper Barrackpore": "Capsicum Chinense",
"7 Pot Pepper Brain Strain Yellow": "Capsicum Chinense",
"7 Pot Pepper Orange": "Capsicum Chinense",
"7 Pot Pepper Yellow": "Capsicum Chinense",
"7 Pot Pink Pepper": "Capsicum Chinense",
"7 Pot Rust Pepper": "Capsicum Chinense",
"Abe Lincoln Tomato": "Solanum Lycopersicum",
@taesiri
taesiri / FontFusion.pde
Last active December 25, 2018 22:34
Font Fusion
PFont myFont;
void setup() {
size(1000, 1000);
String[] fontList = PFont.list();
int counter = 0;
background(0);
for(String fontName : fontList) {
myFont = createFont(fontName, 210);