Skip to content

Instantly share code, notes, and snippets.

@nwgat
nwgat / ubuntu_update_booting_kernel.md
Created January 20, 2023 01:52 — forked from chaiyujin/ubuntu_update_booting_kernel.md
Ubuntu: Install Kernel and Set GRUB Default Kernel

Ubuntu: Install Kernel and Set GRUB Default Kernel

Install Kernel

Install the default kernel:

sudo apt install linux-generic

Set GRUB Default Kernel

  1. Find entrance from /boot/grub/grub.cfg
    • Get the $menuentry_id_option:
@nwgat
nwgat / install_cygwin_sshd.txt
Created August 14, 2020 03:55 — forked from roxlu/install_cygwin_sshd.txt
Installing CYGWIN + SSHD for remote access through SSH on windows
Installing CYGWIN with SSH
1) Download cygwin setup.exe from http://www.cygwin.com
- Execute setup.exe
- Install from internet
- Root directory: `c:\cygwin` + all users
- Local package directory: use default value
- Select a mirror to download files from
- Select these packages:
- editors > xemacs 21.4.22-1
- net > openssh 6.1-p
@nwgat
nwgat / loudness.rb
Created January 29, 2017 04:57 — forked from kylophone/loudness.rb
FFmpeg loudnorm filter - dual pass loudness normalization example - http://k.ylo.ph/2016/04/04/loudnorm.html
#!/usr/bin/env ruby
require 'open3'
require 'json'
ffmpeg_bin = '/usr/local/bin/ffmpeg'
target_il = -24.0
target_lra = +11.0
target_tp = -2.0
samplerate = '48k'
@nwgat
nwgat / README.md
Last active December 9, 2016 21:16 — forked from sandfox/README.md
Quick and dirty instructions for building nginx with rtmp support

#Compiling Nginx with RTMP module

  1. Install the following packages sudo apt-get install python-software-properties dpkg-dev git
  2. Add Nginx repo sudo add-apt-repository ppa:nginx/stable
  3. Update package list sudo apt-get update
  4. Get nginx source (put this in it's own dir like /build sudo apt-get source nginx-full
@nwgat
nwgat / daisuki.py
Created November 12, 2016 12:27 — forked from intact/daisuki.py
Daisuki plugin for livestreamer
import base64
import json
import random
import re
import time
try:
from Crypto import Random
from Crypto.Cipher import AES, PKCS1_v1_5
from Crypto.PublicKey import RSA

Live Transcoding

This is a collection of working commandline examples to show how one could use FFMpeg and VLC for live transcoding of video streams. All examples have been tested on OSX 10.7.5 with FFMPeg 1.1.3 and VLC 2.0.5 in early 2013.

Documentation links

@nwgat
nwgat / gist:1ce8b79d8bbc5c2ba37ab369bc4d78f4
Last active April 5, 2016 19:52 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@nwgat
nwgat / gist:023efc621cc991e014a8
Created March 20, 2016 19:31 — forked from anonymous/gist:ff138778f92bb5c927e0
save/load python json file
ripped from http://kaira.sgo.fi/2014/05/saving-and-loading-data-in-python-with.html
## Saving a Python dictionary to disk using JSON
#!/usr/bin/python
# This only uses the json package
import json
# Create a dictionary (a key-value-pair structure in Python)