Skip to content

Instantly share code, notes, and snippets.

View nnja's full-sized avatar
🐝
I'm a busy bee and may be slow to respond.

Nina Zakharenko nnja

🐝
I'm a busy bee and may be slow to respond.
View GitHub Profile
@nnja
nnja / nina.zsh-theme
Last active February 23, 2017 00:47
My zshell prompt theme, a bastardization of robbyrussel & kolo themes
autoload -Uz vcs_info
zstyle ':vcs_info:*' stagedstr '%F{green}●'
zstyle ':vcs_info:*' unstagedstr '%F{yellow}●'
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{11}%r'
zstyle ':vcs_info:*' enable git svn
theme_precmd () {
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] {
zstyle ':vcs_info:*' formats '%c%u%B%F{green} '

Keybase proof

I hereby claim:

  • I am nnja on github.
  • I am nnja (https://keybase.io/nnja) on keybase.
  • I have a public key whose fingerprint is E80D A711 1E08 1568 81EC 1325 2DD8 28C5 1A3D D12D

To claim this, I am signing this object:

@nnja
nnja / gist:d8e210cb0ffe69a64897
Created March 18, 2015 06:11
emacs yasnippet ipdb template
# -*- mode: snippet -*-
# name: i
# key: i
# group : general
# --
import ipdb; ipdb.set_trace()
@nnja
nnja / kenobi.el
Last active August 29, 2015 14:17 — forked from nyergler/kenobi.el
(add-hook 'hack-local-variables-hook 'run-local-vars-mode-hook)
(defun run-local-vars-mode-hook ()
"Run a hook for the major-mode after the local variables have been processed."
(run-hooks (intern (concat (symbol-name major-mode) "-local-vars-hook"))))
(defun detect_buffer_venv (buffer-name)
(let ((buffer-dir (file-name-directory buffer-name)))

Installing GNU Screen on OS X in Homebrew

I want to edit in one tab, run what I edit in the other. Typical multi-view stuff. I've used Terminal.app for the last few years. Lately, however, after not long enough, Terminal gets laggy when I switch between tabs.

The stutter between edit and run is annoying, an unnacceptable. One of the major reason I've chosen to work with character based UI is because it is snappy. There shouldn't be a lag while a screen of UTF-8 is rendered in a monospace font.

The lag gets progressively longer, chipping at my productivity with irritation. The only solution is to kill all my Terminals, which essentially kills my flow. Terminal.app won't remember where I was for me. I have to initialize ever tab.

GNU Screen

@nnja
nnja / .bashrc
Last active December 18, 2015 18:29
# Setup Amazon EC2 CLI
export EC2_HOME=~/.ec2
export EC2_PRIVATE_KEY=`ls $EC2_HOME/pk-*.pem`
export EC2_CERT=`ls $EC2_HOME/cert-*.pem`
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
# Path entry for AWS EC2 Command line tools
PATH=$PATH:$EC2_HOME/bin
# Path entry for AWS CLI Elastic Bean Command line tools