Skip to content

Instantly share code, notes, and snippets.

@jim-my
jim-my / _service.md
Last active August 15, 2020 01:44 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample (old init.d) service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@jim-my
jim-my / docker-ssh-forward.bash
Created June 4, 2020 01:49 — forked from d11wtq/docker-ssh-forward.bash
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@jim-my
jim-my / karabiner.edn
Created December 28, 2019 00:50 — forked from kaushikgopal/karabiner.edn
My source Karabiner file in Goku's edn format (For generated karabiner.json see https://gist.github.com/kaushikgopal/c802ca81044066f7d93a50c5269cc812)
{
;; ! | means mandatory
;; # | means optional
;; !! | mandatory command + control + optional + shift (hyper)
;; ## | optional any
;; to understand better how modifiers work in karabiner
;; https://pqrs.org/osx/karabiner/json.html#from-event-definition-modifiers
;; C | left_command
@jim-my
jim-my / infra-secret-management-overview.md
Created February 3, 2019 00:03 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

brew install macvim --with-cscope --with-lua --override-system-vim
@jim-my
jim-my / where_is.rb
Last active August 29, 2015 14:19 — forked from wtaysom/where_is.rb
module Where
class <<self
attr_accessor :editor
def is_proc(proc)
source_location(proc)
end
def is_method(klass, method_name)
source_location(klass.method(method_name))
<VirtualHost *:80>
ServerName pow
ServerAlias *.dev
ServerAlias *.xip.io
ProxyPass / http://localhost:20559/
ProxyPassReverse / http://localhost:20559/
ProxyPreserveHost On
</VirtualHost>
@jim-my
jim-my / pre-commit-php
Created August 18, 2014 11:38
git hook that checks php syntax(php -l)
#!/usr/bin/env bash
#
# - Not really useful, as my vim will check this. Just as an example.
# - I'd rather use ruby to write this script
#
# http://www.sitepoint.com/introduction-git-hooks/
# Override IFS so that spaces do not count as delimiters
old_ifs=$IFS
IFS=$'\n'