Skip to content

Instantly share code, notes, and snippets.

@andyr
andyr / userAvatar.js
Created April 14, 2018 00:40 — forked from SylarRuby/userAvatar.js
NodeJs AWS S3 Upload
/**
* This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from
* a base64 string.
* This code is used in my startup, Zired.
* Web: http://zired.io
*/
// You can either "yarn add aws-sdk" or "npm i aws-sdk"
const AWS = require('aws-sdk')
@andyr
andyr / SimpleHTTPServerWithUpload.py
Created December 1, 2016 04:12 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@andyr
andyr / tmux.md
Created April 20, 2016 18:32 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@andyr
andyr / tmux-cheatsheet.markdown
Created April 20, 2016 18:32 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andyr
andyr / chromeos-crosh-custom-setup.md
Created December 7, 2015 02:10 — forked from aaronhalford/chromeos-crosh-custom-setup.md
Customize ChromeOS Crosh Terminal with Custom Fonts and Solarized Dark Theme

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@andyr
andyr / gist:073c5a35090c5806fe14
Created November 12, 2015 22:59 — forked from pithyless/gist:1208841
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@andyr
andyr / flex-middle.css
Created February 12, 2014 01:08
Example flexible 3-column CSS layout. Compatible with old browsers.
.col {
border: 1px solid;
margin: 0;
padding: 5px;
}
.a {
width: 100px;
float: left;
border-color: blue;
@andyr
andyr / Find git repos
Created September 22, 2012 18:08
Print paths to all git repos in a directory tree.
#!/bin/sh
ls -lRA | grep "\.git:$" | sed 's/\.git://g'