Skip to content

Instantly share code, notes, and snippets.

@jottr
jottr / install-config.sh
Created January 31, 2022 17:07 — forked from obfischer/install-config.sh
Generate Karabiner Elements configuration out of y YAML document
set -x
cat karabiner.yaml | ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json' \
| jq --sort-keys 'del(.definitions)' > karabiner.json
@jottr
jottr / config.yml
Created April 23, 2018 18:10 — forked from phra/config.yml
Update Chrome to latest version on CircleCI 2.0
- run: #STABLE
name: Install Chromedriver latest version
command: |
sudo apt-get update
sudo apt-get install lsb-release libappindicator3-1
curl -L -o google-chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome.deb
sudo sed -i 's|HERE/chrome"|HERE/chrome" --no-sandbox|g' /opt/google/chrome/google-chrome
rm google-chrome.deb
@jottr
jottr / install-comodo-ssl-cert-for-nginx.rst
Created December 8, 2017 10:29 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@jottr
jottr / gist:679617aba5a7b09d1039
Created December 13, 2015 19:13 — forked from dbiesecke/movies.m3u
pvr.iptvsimple iptvde.m3u
#EXTM3U
#EXTINF:-1 tvg-id="ARD.de" tvg-logo="ard.png",ARD
http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/master.m3u8
#EXTINF:-1 tvg-id="ZDF.de" tvg-logo="zdf.png",ZDF
http://zdf_hds_de-f.akamaihd.net/i/de14_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="tagesschau24.de" tvg-logo="tagesschau24.png",TAGESSCHAU 24
http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/master.m3u8
#EXTINF:-1 tvg-id="ZDFneo.de" tvg-logo="zdfneo.png",ZDF NEO
http://zdf_hds_de-f.akamaihd.net/i/de13_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="ZDFinfo.de" tvg-logo="zdfinfo.png",ZDF INFO
@jottr
jottr / vj.sh
Last active July 14, 2017 23:01 — forked from kljensen/vj.sh
A simple, encrypted journal using vim.
#!/usr/bin/env bash
##########################################################
#
# This is a shell script for keeping a journal that is
# * plaintext,
# * time-stamped,
# * encrypted, and
# * edited with vim.
#
@jottr
jottr / tmux.md
Last active August 29, 2015 14:08 — forked from andreyvit/tmux.md

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

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@jottr
jottr / .vimrc
Last active October 5, 2019 00:59 — forked from vinniefranco/gist:4730156
Quickly convert string to array in vim
" Quick array creation
nmap <leader>ta vF=l<Esc>:s/\%V\S\+/"&",/g<CR>A<BS><Esc>vF=2lgS[JJ:let @/ = ""<CR>