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
@JasSuri
JasSuri / moonlight_sunshine_gamestream_guide.md
Last active July 13, 2024 00:04
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.
@shitchell
shitchell / git-user-stats
Last active July 10, 2024 14:13
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 '^$' \
@brabect1
brabect1 / huddle_usage.rst
Last active June 15, 2024 14:33
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

@jamiebullock
jamiebullock / .zshrc
Created April 9, 2021 10:06
Manjaro zshrc adapted for Mac
## Options section
setopt correct # Auto correct mistakes
setopt extendedglob # Extended globbing. Allows using regular expressions with *
setopt nocaseglob # Case insensitive globbing
setopt rcexpandparam # Array expension with parameters
setopt nocheckjobs # Don't warn about running processes when exiting
setopt numericglobsort # Sort filenames numerically when it makes sense
setopt nobeep # No beep
setopt appendhistory # Immediately append history instead of overwriting
@OdatNurd
OdatNurd / Default (PLATFORM).sublime-keymap
Created March 4, 2021 23:16
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"}]
]
},
@OdatNurd
OdatNurd / snippet_folder.py
Created February 15, 2021 09:30
Sublime Text 4 plugin to expand snippets and automatically fold parts of them up
import sublime
import sublime_plugin
class ExpandAndFoldSnippetCommand(sublime_plugin.TextCommand):
def run(self, edit, name, folds):
self.view.run_command("insert_snippet", {"name": name})
for _ in range(folds):
self.view.run_command("fold")
@akbyrd
akbyrd / 0 - Resource Creation.cpp
Created July 30, 2020 19:31
DirectX 11 Swap Chain Format Support
DXGI_FORMAT renderTextureFormat = DXGI_FORMAT_B5G6R5_UNORM;
// Device
hr = D3D11CreateDevice(
nullptr,
D3D_DRIVER_TYPE_HARDWARE,
nullptr,
D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_DEBUG,
@lzlrd
lzlrd / skagen-wearos-smoothme.sh
Last active February 25, 2021 09:55
Remove bloatware from Fossil and Skagen Wear OS smartwatches
#!/usr/bin/env bash
# A shell script to remove bloatware from Fossil and Skagen Wear OS smartwatches.
# Diab Neiroukh - 2/Jul/2020 (Licensed under the GNU GPLv3)
ticApps=(
"com.mobvoi.wear.fitness.aw" \
"com.mobvoi.ticwear.sidewearvoicesearch" \
"com.mobvoi.wear.social.aw" \
"com.mobvoi.wear.account.aw" \
"com.mobvoi.wear.appsservice" \
-module(palin).
-export([test/0]).
-export([server/0]).
-export([start/0, check/2, stop/1]).
test() ->
Checks = [{"Abba", true},
{"baba", false},
{"Yo hago yoga hoy", true},

Phoenix 1.4.x to 1.5.0 upgrade instructions

Phoenix 1.5 requires Elixir >= 1.7. Be sure your existing version is up to date by running elixir -v on the command line.

Install the new phx.new project generator

$ mix archive.uninstall phx_new
$ mix archive.install hex phx_new 1.5.0