Skip to content

Instantly share code, notes, and snippets.

View Laymer's full-sized avatar
:shipit:
Looking for cool C, TCL & Erlang things to test

Igor K Laymer

:shipit:
Looking for cool C, TCL & Erlang things to test
View GitHub Profile
@Laymer
Laymer / huddle_usage.rst
Created March 14, 2024 15:21 — forked from brabect1/huddle_usage.rst
Using Tcl Huddle serialization format. #tcl #huddle

Tcl Huddle

Tcllib's ::huddle is a native serialization format and is part of its YAML package. ::huddle's function is the same as of JSON or YAML; that is to augment commond data types along with the data. When JSON or YAML get parsed into an interpretter, individual data get represented by its native type; that is, string becomes a string, list becomes a list, map becomes a map/hash/dictionary, etc.

In Tcl, the problem is that all these types are mostly interchangeble (which is normally

@Laymer
Laymer / moonlight_sunshine_gamestream_guide.md
Created January 21, 2024 15:27 — forked from JasSuri/moonlight_sunshine_gamestream_guide.md
Moonlight and Sunshine gamestream guide for Windows 11

This guide was last updated: 20th December 2022, and the most optimum settings may differ as Sunshine and Moonlight are updated.

Overview

This guide is intended to help those migrating from streaming their games with Nvidia GameStream, to Sunshine. It will help you setup the Moonlight client and Sunshine gamesteam host to stream your PC games to your other devices. The aim is to optimise the settings to get similar streaming performance as Nvidia GameStream.

Prerequisites

  1. Download and install Moonlight client on your chosen device
  2. Download and install the nightly build of Sunshine gamestream host on the PC which you want to stream games from.
@Laymer
Laymer / git-user-stats
Created June 30, 2023 00:32 — forked from shitchell/git-user-stats
Show user stats in a git repo
#!/bin/bash
#
# Show user stats (commits, files modified, insertions, deletions, and total
# lines modified) for a repo
git_log_opts=( "$@" )
git log "${git_log_opts[@]}" --format='author: %ae' --numstat \
| tr '[A-Z]' '[a-z]' \
| grep -v '^$' \
@Laymer
Laymer / git-commit-log-stats.md
Created June 30, 2023 00:32 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@Laymer
Laymer / perf-flame-graph-notes.md
Created April 8, 2021 19:36 — forked from trevnorris/perf-flame-graph-notes.md
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@Laymer
Laymer / Default (PLATFORM).sublime-keymap
Created April 1, 2021 09:09 — forked from OdatNurd/Default (PLATFORM).sublime-keymap
Closing a Terminus view and pane at the same time
[
// If you use the Chain of Command package, use this binding to chain
// the two required commands together.
{ "keys": ["ctrl+shift+h"], "command": "chain",
"args": {
"commands": [
["terminus_close"],
["destroy_pane", {"direction": "self"}]
]
},
@Laymer
Laymer / parallelize-compression.sh
Created February 25, 2021 09:56 — forked from lzlrd/parallelize-compression.sh
A Shell Script To Install Parallel Compression Tools On Debian-based Systems And Replace The Default Single-Threaded Tools.
#!/usr/bin/env bash
# A Shell Script To Install Parallel Compression Tools On Debian-based Systems And Replace The Default Single-Threaded Tools.
# Diab Neiroukh - 23/Feb/2020 (Licensed under The Unlicense)
sudo apt install lbzip2 pigz lunzip
pushd /usr/local/bin || exit
sudo ln -s /usr/bin/lbzip2 bzip2
sudo ln -s /usr/bin/lbzip2 bunzip2
sudo ln -s /usr/bin/lbzip2 bzcat
sudo ln -s /usr/bin/pigz gzip
@Laymer
Laymer / hitchhikers-guide-to-machine-learning.md
Created February 22, 2021 13:40 — forked from daksis/hitchhikers-guide-to-machine-learning.md
Hitchhikers Guide to Machine Learning Resources

Hitchhikers Guide to Machine Learning Resources

Reference Sources

  1. Project Rhea — online learning community where students teach other students. The tutorials here vary in detail and quality. Generally they are more that a definition at mathworld, less than a step by step. Good for getting the highlights on an unfamiliar topic
  2. Wolfram Mathworld — Like wikipedia, but only for Math. Go here when you have no idea what an "Isotopic Kernel is or why you would care. Mathworld will give you 80+ entries that are linked.
  3. Wikipedia Math Portal — the place to find everything math related on Wikipedia.

Math References

@Laymer
Laymer / zshrc
Created November 2, 2020 10:49 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history