Skip to content

Instantly share code, notes, and snippets.

'editor':
'lineHeight': 1.45
'softWrap': true
'normalizeIndentOnPaste': true
'tabLength': 2
'preferredLineLength': 100
'invisibles':
'cr': '↩'
'eol': ''
'space': '·'
@nshtg
nshtg / install_teamspeak.sh
Last active March 4, 2016 02:37 — forked from x3ro/install_teamspeak.sh
Teamspeak 3 installation script for Debian based systens (incl. Ubuntu)
#!/bin/bash
#
# A small script that sets up a teamspeak 3 server.
# Tested on debian and ubuntu.
#
# Source: http://coding-journal.com
#
TMP="/tmp/teamspeak/"
INSTALL_PATH="/usr/local/teamspeak3/"
@nshtg
nshtg / README.md
Created March 7, 2016 17:11 — forked from nickbudi/README.md
Budi's Counter-Strike: Global Offensive config

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config.

Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

After the lovely Wild West RNG Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg

Launch Options

@nshtg
nshtg / Cargo.toml
Created July 25, 2016 11:41 — forked from p-jackson/Cargo.toml
Https with hyper on Windows without using OpenSSL
[dependencies]
schannel = "0.0.2"
[dependencies.hyper]
version = "0.7"
default-features = false
@nshtg
nshtg / caddy.sh
Last active June 23, 2017 08:41 — forked from Jamesits/caddy.sh
Install Caddy Server on Centos with Systemd.
useradd www-data --system || true
curl -L https://getcaddy.com | bash -s http.awslambda,http.cgi,http.cors,http.expires,http.filemanager,http.filter,http.git,http.hugo,http.ipfilter,http.jwt,http.mailout,http.minify,http.prometheus,http.proxyprotocol,http.ratelimit,http.realip,http.upload,dns,net,hook.service
chown root:root /usr/local/bin/caddy
chmod 755 /usr/local/bin/caddy
setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
mkdir -p /etc/caddy
chown -R root:www-data /etc/caddy
mkdir -p /etc/ssl/caddy
chown -R www-data:root /etc/ssl/caddy
@nshtg
nshtg / subl
Created September 29, 2017 13:49 — forked from cmalard/subl
Cygwin + Sublime Text 3 : works with files and Git
#!/bin/bash
# To create in [.babun/]cygwin/usr/local/bin/subl with chmod +x
ARGS=""
while test $# -gt 0
do
ARGS="$ARGS ${1#/cygdrive/[a-zA-Z]}"; # Remove /cygdrive and disk letter from the path
shift
done
@nshtg
nshtg / mysql-docker.sh
Last active June 7, 2024 07:39 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE > backup.sql
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | gzip > backup.sql.gz
docker exec CONTAINER /usr/bin/mysqldump -u root -pPASSWORD DATABASE | bzip2 > backup.sql.bz2
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
gunzip < backup.sql.gz | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
bunzip2 < backup.sql.bz2 | docker exec -i CONTAINER /usr/bin/mysql -u root -pPASSWORD DATABASE
@nshtg
nshtg / packages.sh
Last active June 9, 2023 11:23 — forked from shinchiro/packages.txt
Missing Cygwin/MSYS2 packages
#!/usr/bin/env bash
# Install re2c
cd /tmp &&
git clone --depth 1 https://github.com/skvadrik/re2c.git &&
cd re2c/re2c &&
./autogen.sh &&
./configure --prefix=/usr &&
make -j$(nproc) && make install &&
rm -rf /tmp/re2c
@nshtg
nshtg / VP9 Encode Guide.md
Created October 10, 2020 12:18 — forked from mrintrepide/VP9 Encode Guide.md
VP9 Encode Guide (ffmpeg, libvpx-vp9, vpxenc)

WIP

VP9 encode is very very slow ?
Yes and no. Unlike x265 use all core to speed up encode time, the low threaded libvpx-vp9 use for me 4 core of my Ryzen 3900X. Encode 4 video in the same time -> x4 "boost".

Quality (Unconstrained)

Force dynamic bitrate with b:v 0
Set quality level with -crf <quality level> is a integer (0 to 63)
libvpx use -deadline and ffmpeg -quality need to be set to good.

@nshtg
nshtg / dnsovertls.md
Created May 4, 2021 08:18 — forked from uraimo/dnsovertls.md
Configure your Mac to use DNS over TLS