Skip to content

Instantly share code, notes, and snippets.

@malfario
malfario / ranger-cheatsheet.md
Created October 25, 2021 07:00 — forked from heroheman/ranger-cheatsheet.md
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@malfario
malfario / gist:987d581375f767d8e53d309f061edac8
Created October 18, 2021 15:59 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@malfario
malfario / build-psi-plus.md
Last active May 10, 2019 16:51
Build psi-plus
  • Install [Homebrew][1]
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Install dependencies
$ brew install libsignal-protocol-c openssl hunspell coreutils qca qt
@malfario
malfario / sleep-display.ahk
Last active April 12, 2019 12:12
Autohotkey script to sleep display on Windows w/ `Ctrl-Shift+Eject` (ala macOS)
Sleep, 100 ; Avoid awakening display on releasing keys
^+CtrlBreak::PostMessage, 0x0112, 0xF170, % (i:=!i)?2:-1,, A
@malfario
malfario / WSL-ssh-server.md
Created February 26, 2019 07:50 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@malfario
malfario / tmux.md
Created February 4, 2019 08:32 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@malfario
malfario / .bumpversion.cfg
Created January 25, 2019 17:33 — forked from wshayes/.bumpversion.cfg
Bumpversion configuration
[bumpversion]
current_version = 0.0.0
commit = True
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)(?P<build>\d+))?
serialize =
{major}.{minor}.{patch}-{release}{build}
{major}.{minor}.{patch}
[bumpversion:part:release]
@malfario
malfario / keybase.md
Created May 11, 2018 09:55
Keybase proof

Keybase proof

I hereby claim:

  • I am malfario on github.
  • I am malfario (https://keybase.io/malfario) on keybase.
  • I have a public key ASDpRJn7k820MQ78-mxp8m1TktFJR4oHum2FegdOUFy7cQo

To claim this, I am signing this object:

@malfario
malfario / define-clojure-indent.lisp
Created March 12, 2018 06:46
Compojure indent in spacemacs
(define-clojure-indent
(defroutes 'defun)
(GET 2)
(POST 2)
(PUT 2)
(DELETE 2)
(HEAD 2)
(ANY 2)
(OPTIONS 2)
(PATCH 2)
@malfario
malfario / virtualenv.lua
Last active January 11, 2018 18:10
Cmder virtualenv prompt fix
-- Code based on https://github.com/cmderdev/cmder/issues/1056
-- with modifications to make it actually work (https://github.com/cmderdev/cmder/issues/1056#issuecomment-237403714)
---
-- Find out current conda/virtual envs
-- @return {false|conda/virtual env name}
---
local clink_path_lua_file = clink.get_env('CMDER_ROOT')..'\\vendor\\clink-completions\\modules\\path.lua'
dofile(clink_path_lua_file)