Skip to content

Instantly share code, notes, and snippets.

D. Bohdan dbohdan

Block or report user

Report or block dbohdan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dbohdan / tmux-cheatsheet.markdown
Last active Sep 21, 2015 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
dbohdan / decoder.tcl
Last active Aug 29, 2015
Go Challenge 1 in Tcl
View decoder.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 Mar 9, 2018 — forked from smls/grades.p6
Data munging task from the Perl 6 advent calendar
View grades.tcl
#!/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 Apr 17, 2016
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
View logo.svg
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 Aug 17, 2013
Adopted from the "Bash: cd to last path after exit" example in the man page for ranger(1).
View Zsh: change directory using ranger
ranger-cd() {
ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
rm -f -- "$tempfile"
You can’t perform that action at this time.