Skip to content

Instantly share code, notes, and snippets.

@spotlesscoder
spotlesscoder / tmux-cheatsheet.markdown
Created January 25, 2018 14:01 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@spotlesscoder
spotlesscoder / spDYN_update.sh
Created May 21, 2018 20:05 — forked from harald-aigner/spDYN_update.sh
Script for updating spDYN dynamic DNS entries (https://spdyn.de)
#!/bin/sh
#
# Script for updating spDYN dynamic DNS entries (https://spdyn.de)
#
# Usage:
# - Save this script as $HOME/bin/spDYN_update.sh
# - Make it executable: chmod u+x $HOME/bin/spDYN_update.sh
# - Create a cron entry (crontab -e) and supply <HOST_NAME> and <UPDATE_TOKEN>
# according to your spDYN settings. Example for running every 10 minutes:
# */10 * * * * $HOME/bin/spDYN_update.sh <HOST_NAME> <UPDATE_TOKEN> > /dev/null
[
{
"id": "404e83a4.3d826c",
"type": "tab",
"label": "Request_statuses",
"disabled": false,
"info": ""
},
{
"id": "79e3e47.b8f891c",
@spotlesscoder
spotlesscoder / airwave64.sh
Created August 25, 2018 17:55 — forked from rodlie/airwave64.sh
Build and install Airwave64 on Ubuntu Bionic (https://youtu.be/p93Fj3I3t9I)
#!/bin/sh
# Build and install Airwave64
# https://github.com/rodlie - <[email protected]>
#
CWD=`pwd`
AIRWAVE_GIT="https://github.com/phantom-code/airwave"
AIRWAVE_COMMIT="8cd3507a46c2f7809a2ef8481cbded7dcbbae8ff"
VST_V="369_01_03_2018_build_132"
#!/bin/bash
wget https://download.savannah.gnu.org/releases/libtmcg/libTMCG-1.3.16.tar.gz
tar -xvf libTMCG-1.3.16.tar.gz
cd libTMCG-1.3.16
sudo apt install gcc g++ libgmp-dev libgcrypt20-dev make
./configure
make
sudo make install
cd ..
wget https://download.savannah.gnu.org/releases/dkgpg/dkgpg-1.1.0.tar.gz
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
public class Main {
public static void main(String[] args) {
String dateStr1 = "2019-01-30T12:04:12.734Z";
String dateStr2 = "2019-01-30T12:04:12.21Z";
@spotlesscoder
spotlesscoder / reclaimWindows10.ps1
Created December 11, 2019 22:06 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@spotlesscoder
spotlesscoder / WinUSBFromLinux.md
Created January 17, 2020 20:07
How to make Windows 7 USB flash install media from Linux?

How to make Windows 7 USB flash install media from Linux?

StackOverflow

  • Install ms-sys - if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)
  • Check what device your USB media is assigned - here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:
# cfdisk /dev/sdb
or fdisk /dev/sdb (partition type 7, and bootable flag)
@spotlesscoder
spotlesscoder / awoo_tool.lua
Created April 18, 2020 21:47 — forked from wolfiestyle/awoo_tool.lua
the Awoo Tool™
#!/usr/bin/env lua
-- Awoo Tool by @wolfiestyle
-- license: MIT/X11
-- demo: https://twitter.com/wolfiestyle/status/767124329461084161
local lgi = require "lgi"
local Gtk = lgi.Gtk
local GLib = lgi.GLib
local window = Gtk.Window{
title = "awoo tool v0.1-alpha",

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.