Skip to content

Instantly share code, notes, and snippets.


Henrik Lissner hlissner

View GitHub Profile
mjlbach /
Last active Oct 21, 2020
Installing gccEmacs (native-comp) with Nix


Adding the overlay and configuring cachix

Option 1: Adding the overlay to configuration.nix or home.nix

Add the nix-community overlay to your nixpkgs. You can add the following to your configuration.nix (NixOS, non-user specific) or to your home-manager's home.nix. Note in the case of the latter, this will not be available for installation via nix-env.

  nixpkgs.overlays = [
ar1a /
Last active May 7, 2019
Lazy load function for zsh
#!/usr/bin/env zsh
# usage: lazyload <name> <path> [source ...] -- callback
lazyload() {
local name="$1"; shift
local spath="$1"; shift
local sources=()
while [[ $# -gt 0 ]]; do
case "$1" in
JeroenDStout /
Last active Jun 5, 2020 — forked from aytch/
The Mythology of Rain World



  • Wastelands, Cyan - Five Pebble's Mistake
  • Industrial, Blue - The Mask Factory
  • Shore (Moon), Yellow - Sliver of Straw's News
  • Shore (Bridge), Purple - Iterators and Water
  • Sky Islands, Dark Blue - {Random chatlog}
  • Sky Islands, Dark Purple - {Random chatlog}
jordonbiondo / imenu-use-packge.el
Last active Sep 28, 2016
have imenu include use-package
View imenu-use-packge.el
;; in action:
(add-to-list 'imenu-generic-expression
'("Used Packages"
"\\(^\\s-*(use-package +\\)\\(\\_<.+\\_>\\)" 2))
;; I also highly recommend imenu-anywhere to make developing your config even easier
prenagha / Create Gist.scpt
Created Jan 13, 2014
Launchbar action to create public gist
View Create Gist.scpt
-- gist support for launchbar
-- 1. install gist client "sudo gem install gist"
-- 2. login "gist --login"
-- use from launchbar as file action, string/search action, or
-- plain action (will take text from clipboard)
-- then will put gist url as launchbar result
-- from there you can Copy it or hit Enter to open in browser
branneman /
Last active Oct 23, 2020
Better local require() paths for Node.js

Better local require() paths for Node.js


When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

View urlencode.zsh
urlencode() {
setopt localoptions extendedglob
input=( ${(s::)1} )
print ${(j::)input/(#b)([^A-Za-z0-9_.\!~*\'\(\)-])/%${(l:2::0:)$(([##16]#match))}}
k-takata / gist:5124445
Last active Jul 17, 2020
Build The Silver Searcher
View gist:5124445

Build The Silver Searcher

the silver searcher

For Win32/64 using MSYS2

Install Packages

Install the following packages using pacman -S package-name:

jassinm /
Last active Apr 7, 2020
c++11 youcompleteme
import os
import ycm_core
from clang_helpers import PrepareClangFlags
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# more details:
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
dergachev /
Last active Oct 23, 2020
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF


To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

You can’t perform that action at this time.