Skip to content

Instantly share code, notes, and snippets.

@vensder
vensder / gist:dba5cb68a42683ba03641e28cbc62d62
Created May 26, 2021 04:00 — forked from n0mer/gist:d1ab07e56630339d9ff4
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Print currently selected filename in command line: Esc + Enter
Switch between background command line and MC: Ctrl + o
@vensder
vensder / 1-promises.coffee
Created November 21, 2020 07:53 — forked from pketh/1-promises.coffee
Promises in Coffeescript
# Create a promise:
myCoolPromise = new Promise (resolve, reject) ->
# do a thing
success = true
if success
resolve 'stuff worked'
else
reject Error 'it broke'

Keybase proof

I hereby claim:

  • I am vensder on github.
  • I am vensder (https://keybase.io/vensder) on keybase.
  • I have a public key ASCmwtMaQfXcqgxHam7fBoq8HZ93oQqJDqFmHaxwPlBgIAo

To claim this, I am signing this object:

@vensder
vensder / key_to_json
Created October 13, 2017 17:41 — forked from pepoviola/key_to_json
convert new lines into \n for use ssh key in json
sed ':a;N;$!ba;s/\n/\\n/g' my_key.pem
or in vi
:%s/\n/\\n/
https://tickets.opscode.com/browse/CHEF-3540
@vensder
vensder / jail.local
Last active May 23, 2017 13:53 — forked from Nihisil/jail.local
Send notifications to the Slack from fail2ban
...
action_with_slack_notification = %(banaction)s[name=%(__name__)s, port="%(port)s"]
slack[name=%(__name__)s]
action = %(action_with_slack_notification)s
...
@vensder
vensder / post-receive-jenkins
Last active February 7, 2017 18:06 — forked from pcholakov/post-receive-jenkins
Gitolite post-receive hook to trigger builds of Jenkins / Git jobs
#!/bin/bash
# place script in hooks dir in repo, rename post-receive-jenkins to post-receive, chmod +x file
# Gitolite [https://github.com/sitaramc/gitolite]
# Jenkins Git Plugin [https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin]
# GL_REPO will contain the short relative path of the repository being pushed to, e.g. "projects/component-1", so transform it into the Git URL format that your Jenkins build jobs follow:
REPOSITORY_URL=git@gitolite.example.com:$GL_REPO
# Jenkins Git plugin notification URL -- update host as appropriate:
@vensder
vensder / ubuntu14.04-command-line-install-android-sdk
Last active July 6, 2016 17:25 — forked from shark0der/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk (platform & platform-tools only, no emulator)
# install java
apt-get install -y software-properties-common
apt-add-repository -y ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
# download latest android sdk
# http://developer.android.com/sdk/index.html#Other
cd /opt
wget http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz