Skip to content

Instantly share code, notes, and snippets.

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
View keybase.md

Keybase proof

I hereby claim:

  • I am dbohdan on github.
  • I am dbohdan (https://keybase.io/dbohdan) on keybase.
  • I have a public key whose fingerprint is 63CF C411 09EA 361C 20F6 B195 DE95 4CFB D7E1 EDEE

To claim this, I am signing this object:

@dbohdan
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:

tmux

start new with session name:

tmux new -s myname
@dbohdan
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
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
dbohdan / f-sharp-fedora-21.sh
Last active Apr 17, 2016
Install F# and Mono 4.0 on Fedora 21
View f-sharp-fedora-21.sh
#!/bin/sh
set -e
# Repo info: https://lists.fedoraproject.org/pipermail/fedora-mono/2013-November/000466.html
curl http://download.opensuse.org/repositories/home:/tpokorra:/mono/Fedora_21/home:tpokorra:mono.repo | sudo tee /etc/yum.repos.d/mono.repo
sudo dnf install -y mono-opt mono-opt-devel
git clone https://github.com/fsharp/fsharp
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
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() {
tempfile=$(mktemp)
ranger --choosedir="$tempfile" "${@:-$(pwd)}" < $TTY
test -f "$tempfile" &&
if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
cd -- "$(cat "$tempfile")"
fi
rm -f -- "$tempfile"
}
You can’t perform that action at this time.