Skip to content

Instantly share code, notes, and snippets.

@vtsatskin
vtsatskin / tableFlip.theme
Last active August 29, 2015 14:25 — forked from dhuynh/tableFlip.theme
Table Flip oh-my-zsh theme
autoload -Uz vcs_info
autoload -U add-zsh-hook
add-zsh-hook precmd mtmdd_precmd
add-zsh-hook preexec mtmdd_preexec
# Table flip
typeset -A table;
table=(
flip "%{$fg[yellow]%}%? %{$fg[red]%}(╯°□°)╯︵ ┻━┻%{$reset_color%}"
upright "%{$fg[yellow]%}┳━┳ ~ ◞(◦_◦◞)%{$reset_color%}"
@vtsatskin
vtsatskin / UW Residences.js
Created April 3, 2012 22:56
A partial list of University of Waterloo residences in JSON
[
{
residence: "V1",
floors: [
{ id: "0", name: "Basement" },
{ id: "1", name: "1" },
{ id: "2", name: "2" },
{ id: "3", name: "3" },
],
buildings: [
@vtsatskin
vtsatskin / cell.css
Last active December 11, 2015 08:08
MadeInWaterloo company cell hover animation. Requires jQuery
.cell {
position: relative;
height: 125px;
margin-bottom: 20px;
background: white;
border-top-width: 0.5em;
border-top-style: solid;
text-align: center; }
@media (min-width: 1200px) {
.cell {
@vtsatskin
vtsatskin / PokeMMO.scpt
Created January 28, 2013 16:43
A Mac OS X launcher for the PokeMMO. 1) Open AppleScript Editor, paste the code 2) Export as an Application, and name it "PokeMMO.app" (won't run otherwise) 3) Save it in the root folder of the client, same location as the `.sh` and `.exe`
set mypath to (path to me) as string
tell application "Finder" to set theFilename to name of file mypath
set theName to characters 1 thru ((offset of "." in theFilename) - 1) of theFilename as string
do shell script "cd " & POSIX path of mypath & "/.. && sh " & theName & ".sh"
@vtsatskin
vtsatskin / doge-term.sh
Last active December 29, 2015 05:58
Doges your terminal up
# Doges your terminal up
# Requires Mac OS X, lolcat, and thinderman's doge
# Doge: https://github.com/thiderman/doge
# lolcat: https://github.com/busyloop/lolcat
# Display a lovely doge
doge
# Alias for periodic pretty doge lines
@vtsatskin
vtsatskin / .gitignore
Last active December 30, 2015 16:09
Python global and user config variables + git. The idea behind this is that you have one central place to keep config variables with the option of having user-specific variables outside of user control. Useful for working with API keys and other sensitive data. Simply put user-specific variables in config_user.py.
config_user.py

Keybase proof

I hereby claim:

  • I am vtsatskin on github.
  • I am vtask (https://keybase.io/vtask) on keybase.
  • I have a public key whose fingerprint is 61DB 3B91 BF7C CCA1 8498 E280 9B8E 4D3A 556F 3566

To claim this, I am signing this object:

➜ App git:(story-book) ✗ yarn --version (⌐•_•)
0.27.5
➜ App git:(story-book) ✗ node --version (⌐•_•)
v8.0.0
➜ App git:(story-book) ✗ react-native --version (⌐•_•)
react-native-cli: 2.0.1
react-native: 0.44.2
@vtsatskin
vtsatskin / gist:dd2e3ca81125b6f3e061176744bd2f7f
Created August 22, 2017 18:35
Running Android emulator through the command line on OSX
# Add this to your shell profile
export ANDROID_HOME=$HOME/Library/Android/sdk/
alias emulator='cd $ANDROID_HOME/tools/; ./emulator'
# In a new shell
emulator @<avd_name>
@vtsatskin
vtsatskin / frames_to_video.py
Created October 23, 2015 20:22
Saving numpy image frames to video with OpenCV
import cv2
import numpy as np
def save_frames(frames, file_path, width, height, fps, codec="mp4v"):
# Define the codec and create VideoWriter object
fourcc = cv2.cv.CV_FOURCC(*codec)
out = cv2.VideoWriter(file_path, fourcc, fps, (width,height))
for frame in frames:
out.write(frame)