Skip to content

Instantly share code, notes, and snippets.

gitting things done

Dino Korah codemedic

gitting things done
Block or report user

Report or block codemedic

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
codemedic /
Last active Jun 6, 2019
Linux-like terminal in Mac OS

Linux-like terminal in Mac OS

Caveat: This was done in anger to aleviate my pain; There could be a better way to do this. Please do leave comments and suggestions.

This script is meant to be used as .bashrc, in order to make the transition from Linux to MacOS less painful. It makes available GNU tools and utils in your PATH so that they can be invoked effortlessly. It also allows you to leave an untainted terminal setup for anything very native to MacOS.

codemedic /
Created Apr 3, 2019
Utility function to print bash colour codes
# based on
__print_color_row() {
local color
color=$(printf '%03d' "$1")
echo -ne "\\033[1;48;5;${color}m \\\\033[48;5;${color}m \\033[0m";
echo -ne "\\033[1;7;38;5;${color}m\\\\033[7;38;5;${color}m \\033[0m";
echo -ne " \\033[1;38;5;${color}m\\\\033[1;38;5;${color}m\\033[0m";
echo -ne " \\033[38;5;${color}m\\\\033[38;5;${color}m\\033[0m";
echo -ne " \\033[2;38;5;${color}m\\\\033[2;38;5;${color}m\\033[0m";
codemedic /
Last active May 30, 2019
Get records from a AWS Kinesis Data Stream. It allows you to start iterating from a time in the past.
#!/usr/bin/env bash
if ! aws_bin="$(which aws)" 2>/dev/null; then
echo "aws cli is missing; you can get it from"
exit 1
if ! jq_bin="$(which jq)" 2>/dev/null; then
echo "jq is missing; you can get it from"
exit 1
codemedic /
Created Jan 16, 2018
Uploading files to S3 via bash with minimum deps (curl, openssl, base64)
date="$(LC_ALL=C date -u +"%a, %d %b %Y %X %z")"
codemedic /
Created Aug 21, 2017
Build RPM from a git repo that uses git-flow (AVH)
: "${branch:="$(git rev-parse --abbrev-ref HEAD)"}"
: "${tag_or_branch:="$branch"}"
spec=( *spec )
# Relies on git-describe being functional; so git-flow AVH edition is essential
version="$(git describe --abbrev=0 "$branch")"
View clion64.vmoptions
codemedic / .bashrc
Last active May 16, 2018 — forked from chetanmeh/.bashrc
Script to launch commands in multiple tabs in KDE Konsole
View .bashrc
[ -r ~/path/to/ ] &&
. ~/path/to/
# Run multiple commands in individual tabs
commands_in_tabs() {
local cmd profile clear_first clear_cmd="" exit_new_tabs_afterwards exit_current_tab_afterwards title i
local sessions=()
: "${profile:="$(qdbus org.kde.konsole /Konsole defaultProfile)"}"
: "${clear_first:=1}"

Keybase proof

I hereby claim:

  • I am codemedic on github.
  • I am codemedic ( on keybase.
  • I have a public key ASBeG9h2YLQvxBVErQ4zzZIlPPBzG1-D3ldD2Pi4zI4S5go

To claim this, I am signing this object:

View host_icons.example
{"host":"", "icon":"red.png"},
{"host":"", "icon":"green.png"},
{"host":"", "icon":"yellow.png"},
{"host":"", "icon":"orange.png"},
{"host":"", "icon":"blue.png"},
{"host":"", "icon":"cyan.png"},
codemedic / zim-to-sn.rb
Created Nov 3, 2016 — forked from quad/zim-to-sn.rb
Import a (my) Zim notebook to Simplenote
View zim-to-sn.rb
#!/usr/bin/env ruby
require 'json'
require 'Simplenote'
class ZimDirectory < Hash
class ZimException < Exception
attr_reader :dir
You can’t perform that action at this time.