Skip to content

Instantly share code, notes, and snippets.

View lkonga's full-sized avatar
🎯
Focusing

lkonga lkonga

🎯
Focusing
View GitHub Profile

If tmux fails with the message "open terminal failed: missing or unsuitable terminal: rxvt-unicode-256color".

$ ssh remotemachine mkdir -p .terminfo/r
$ scp /usr/share/terminfo/r/rxvt-unicode* remotemachine:.terminfo/r/
@lkonga
lkonga / msys2-setup.md
Created October 16, 2017 11:32 — forked from roblogic/msys2-setup.md
MSYS2 first time setup
@lkonga
lkonga / gist:49390dafff0379583ebccd7bfe0b56b7
Last active October 16, 2017 17:34 — 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
#
@lkonga
lkonga / tubedlaudio.sh
Created November 12, 2016 06:07
download youtube audio and add to mpd
#!/bin/bash
clear
# install with: pip install --user youtube-dl
# TUBE=$HOME/.local/bin/youtube-dl
TUBE=/usr/local/bin/youtube-dl
# get all Formats here and search for m4a, return format codes
FORMAT=`$TUBE -F $1 | grep 'm4a' | cut -c -3`
# choose either 141 [256 kbit/s m4a] of 140 [
FORMAT=$( [[ $FORMAT =~ 141 ]] && echo 141 || echo `[[ $FORMAT =~ 140 ]] && echo 140` )
@lkonga
lkonga / fix_github_https_repo.sh
Created October 29, 2015 13:34 — forked from m14t/fix_github_https_repo.sh
Convert HTTPS github clones to use SSH
#/bin/bash
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'`
if [ -z "$REPO_URL" ]; then
echo "-- ERROR: Could not identify Repo url."
echo " It is possible this repo is already using SSH instead of HTTPS."
exit
fi