Skip to content

Instantly share code, notes, and snippets.

@kekru
kekru / 01-reveal-md-plantuml.md
Last active June 13, 2022 18:43
reveal-md integrate plantuml

Integrate plantuml in reveal-md

This is how to integrate plantuml scripts in you reveal-md presentations.

Download the preproc.js from below to your project and replace the plantuml server url with your plantuml server.
Also replace the plantumlDir with your target dir for the generated png files.
Run reveal-md with the preproc.js:

reveal-md slides.md --preprocessor preproc.js
@ha7ilm
ha7ilm / ranger-cd-for-zshrc.sh
Created July 31, 2016 11:02
ranger-cd for zsh
#This is based on: https://github.com/ranger/ranger/blob/master/examples/bash_automatic_cd.sh
#Paste this into your .zshrc:
function ranger-cd {
tempfile="$(mktemp -t tmp.XXXXXX)"
/usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
@junegunn
junegunn / gist:f4fca918e937e6bf5bad
Last active May 4, 2024 05:07
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
@steventrux
steventrux / Chromecast batch conversion script
Last active May 27, 2021 22:56
A bash script to batch convert video files for chromecast compatibility
#! /bin/bash
# Batch Convert Script by StevenTrux
# The Purpose of this Script is to batch convert any video file to mp4 or mkv format for chromecast compatibility
# this script only convert necessary tracks if the video is already
# in H.264 format it won't convert it saving your time!
# Put all video files need to be converted in a folder!
# the name of files must not have " " Space!
# Rename the File if contain space
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@teranex
teranex / trexprompt.sh
Created April 18, 2011 21:38
My Bash prompt
#!/bin/bash
GIT_PS1_SHOWDIRTYSTATE=true
GIT_BRANCH_COLOR="\[\033[38;5;155m\]\[\033[48;5;235m\]"
PS1_EXIT_RED="\[\033[38;5;208m\]\[\033[48;5;52m\]"
# === Initializing static variables ===========================================
case $TERM in
xterm* | screen)
CORNER_TOP="\[\033(0l\033(B\]"
@cooldaemon
cooldaemon / GetSnippetsList.diff
Created August 10, 2009 08:45 — forked from thinca/GetSnippetsList.diff
neocomplcache + snipMate
*** snipMate.vim.old 2009-04-23 02:30:12.703125000 +0900
--- snipMate.vim 2009-04-23 01:41:56.890625000 +0900
***************
*** 187,190 ****
--- 187,202 ----
let num = inputlist(snippet) - 1
return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1]
endf
+
+ fun GetSnippetsList(ft)