Skip to content

Instantly share code, notes, and snippets.

View sashkachan's full-sized avatar
🐍
sh

Sasha Guljajev sashkachan

🐍
sh
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sasha-glv on github.
  • I am satitchyknows (https://keybase.io/satitchyknows) on keybase.
  • I have a public key ASD5wKEsGB7lHpocjUKmTkBBm47AgvtzszdWjgSn9Q4bYgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am sasha-glv on github.
  • I am sashkachan (https://keybase.io/sashkachan) on keybase.
  • I have a public key ASBIapdb5kXR62lb6pVH_CZx5r9oH8BBtUyX42GZGH0oKQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am alex-glv on github.
  • I am sashkachan (https://keybase.io/sashkachan) on keybase.
  • I have a public key ASAyptxfbkqYFKlxU_QdHF-lngHZp0ECQ-v85aIGBryAOQo

To claim this, I am signing this object:

@sashkachan
sashkachan / .bash_profile
Created August 21, 2017 09:29
.bash_profile
source ~/.bashrc
export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
alias e="emacsclient -nw"
alias ll="ls -la"
alias dm="docker-machine"
alias dc='docker-compose'
alias dstats='while true; do TEXT=$(docker stats --no-stream $(docker ps --format={{.Names}})); sleep 0.1; clear; echo "$TEXT"; done'
@sashkachan
sashkachan / .tmux.conf
Created August 21, 2017 09:28
.tmux.conf
unbind C-b
set -g prefix C-a
bind C-a send-prefix
bind b new-session
set-window-option -g mode-keys emacs
set -g history-limit 10000
set -g default-terminal "screen-256color"
@sashkachan
sashkachan / translate_to_static.py
Created October 5, 2016 14:02
Translates all statically methods to be statically defined. Warning: make sure to do this on a clear git tree to easily revert changes if something goes wrong.
#!/usr/bin/env python3
import fileinput
import os
import re
import sys
class Matcherz:
className = ''
@sashkachan
sashkachan / keymap_dvorak_layer.c
Created February 14, 2016 16:04
Adds layer to switch between dvorak and qwerty
#include "keymap_common.h"
#include "action_layer.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Layer 0: Default Layer */
KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, GRV, BSLS, \
@sashkachan
sashkachan / rand_seq.clj
Last active August 29, 2015 14:25
Infinite sequence of ranged random numbers
(defn rand-range-stream [from to]
(letfn [(rand-ranged [mn mx]
(Math/round (+ mn (* (rand) (- mx mn)))))]
(cons (rand-ranged from to)
(lazy-seq (rand-range-stream from to)))))
(take 5 (rand-range-stream 0 50))