Skip to content

Instantly share code, notes, and snippets.

View misuzu's full-sized avatar

misuzu

  • Kharkiv, Ukraine
  • 14:50 (UTC +03:00)
View GitHub Profile
@ppmathis
ppmathis / debian-stretch-fde.md
Last active January 30, 2022 15:26
Guide which explains an installation of Debian Stretch with full disk encryption (including "/boot" partition, containing initramfs+kernel) by using Debian Jessie Live.

Debian Stretch - Full Disk Encryption

This documents guides you through the process to install Debian Stretch with Full Disk Encryption. The following requirements exist:

  • Mainboard with UEFI-Support
  • Debian Stretch Live CD booted from UEFI
  • Two unformatted, unpartitioned HDDs/SSDs for Software RAID1 with mdmadm

After following this guide, you will end up with a setup like this:

  • Redundant GRUB Standalone EFI installation on both disks
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 16, 2024 19:51
Hyperlinks in Terminal Emulators
@askilondz
askilondz / gistlog.yml
Last active April 2, 2024 10:44
Adaptive Streaming with MPEG-DASH and HLS using AWS

Adaptive Streaming has become the neccessity for streaming video and audio. Unfortantely, as of this post, there isn't a whole lot of tutorials that accumulate all of the steps to get this working. Hopefully this post achieves that. This post focuses on using Amazon Web Services (AWS) to transcode for HLS and DASH and be the Content Delivery Network (CDN) that delivers the stream to your web page. We'll be using Video.js for the HTML5 player as well as javascript support libaries to make Video.js work with HLS and DASH.

So Here's what you need:

Set up three S3 buckets

@plattrap
plattrap / dist_info
Last active February 18, 2022 08:02
python script to help with debugging unattended-upgrade filtering issues.
#!/usr/bin/python3
# running with no arguments will dump all the origins known by apt
# running with a list of package names as arguments will dump the sources for those packages and the known versions for those packages.
import os
import re
import string
import subprocess
import sys
@martijnvermaat
martijnvermaat / nixos.md
Last active May 9, 2024 01:11
Installation of NixOS with encrypted root
@asmagill
asmagill / gist:4b792359c7a01da46b2d
Last active November 19, 2021 10:14
Bash resize terminal function

I forget where I found this, so if anyone wants to claim attribution, let me know and I'll add a line here. If put into /etc/profile.d/serial-console.sh, the following will auto size a serial terminal windows size and create a function for manually adjusting later. Since I access RPIs and BBBs via the serial console, their tty names are already listed in the case statement; add others if your system is different. rsz helps when you later reconnect and minicom or screen is in a different sized window...

    rsz() {
        if [[ -t 0 && $# -eq 0 ]];then
                local IFS='[;' escape geometry x y
                echo -ne '\e7\e[r\e[999;999H\e[6n\e8'
                read -sd R escape geometry
                x=${geometry##*;} y=${geometry%%;*}
                if [[ ${COLUMNS} -eq ${x} && ${LINES} -eq ${y} ]];then

echo "${TERM} ${x}x${y}"

@shamil
shamil / mount_qcow2.md
Last active May 16, 2024 08:22
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@sbiffi
sbiffi / putty.bat
Last active March 22, 2024 13:23
The aim of this vbs script is to launch putty using an URL like ssh://login@host directly from a browser. The .bat is almost the same than .vbs but less robust and just their for older systems.
:: This version is not as powerfull as vbs version, please prefere the other one.
:: It's just there if you need a non-visual basic way to perform this.
:: Restrictions:
:: - Password cannot contain a % or finish with @
:: - Chrome adds a / at the end of the URL, not yet managed
:: The aim of this script is to execute putty with parameters like ssh://login@host
:: Installation:
:: - Launch putty.reg to associate ssh:// and telnet:// to this script
:: - Edit the putty path in parameter below like puttyPath="C:\Program Files (x86)\putty.exe"
@tranthamp
tranthamp / gist:2721326
Created May 17, 2012 20:15
D-Bus and Connman notes
# Connman Technology API examples: (Object Path: /net/connman/technology/<wifi/ethernet>, Interface: net.connman.Technology)
# GetProperties
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.GetProperties
# Scan
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.Scan
# Disable/Enable wifi
dbus-send --system --dest=net.connman --print-reply /net/connman/technology/wifi net.connman.Technology.SetProperty string:Powered variant:boolean:true