Skip to content

Instantly share code, notes, and snippets.

dbohdan / tmux-cheatsheet.markdown
Last active September 21, 2015 19:04 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
dbohdan / decoder.tcl
Last active August 29, 2015 14:17
Go Challenge 1 in Tcl
#!/usr/bin/env tclsh
package require fileutil
namespace eval ::decoder {
# Allow us to use +, -, *, /, etc. as commands outside of the [expr] DSL.
namespace path ::tcl::mathop
proc ::decoder::decode-file {filename} {
# Read the entire file into memory as binary. [::fileutil::cat] runs the
dbohdan / grades.tcl
Last active July 23, 2021 09:30 — forked from smls/grades.p6
Data munging task from the Perl 6 advent calendar
#!/usr/bin/env tclsh
package require sqlite3
package require fileutil
sqlite3 db :memory:
db eval {CREATE TABLE grades(name TEXT PRIMARY KEY, grade TEXT)}
foreach {name grade} [::fileutil::cat grades.txt] {
if {![regexp {[A-F][+-]?} $grade]} {
dbohdan /
Last active April 17, 2016 11:05
Install F# and Mono 4.0 on Fedora 21
set -e
# Repo info:
curl | sudo tee /etc/yum.repos.d/mono.repo
sudo dnf install -y mono-opt mono-opt-devel
git clone
cd fsharp
export PATH=$PATH:/opt/mono/bin
export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
dbohdan / Zsh: change directory using ranger
Created August 17, 2013 16:15
Adopted from the "Bash: cd to last path after exit" example in the man page for ranger(1).
ranger-cd() {
ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
rm -f -- "$tempfile"