Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Vijay's Coding Tips

1 Understand your Coding Environment

1.1 OSX

Homebrew

Use a package manager like Homebrew to install most things like: git, virtualenv, etc.
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X.

Iterm 2

@vijayv
vijayv / reacttutorial.html
Created November 6, 2015 19:53
React tutorial for Agile JS Class
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React Tutorial</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Latest compiled and minified JavaScript -->

Add the remote, call it "upstream":

git remote add upstream git@github.com:vijayv/IOLab.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

Make sure that you're on your master branch:

class User(UserMixin):
# proxy for a database of users
user_database = {"JohnDoe": ("JohnDoe", "John"),
"JaneDoe": ("JaneDoe", "Jane")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
class Transducer:
def _traverse_lefts(root):
x = []
for L in root.lefts:
x = x + Transducer._traverse_lefts(L)
if root.pos_ in ["ADP", "PUNCT"]:
x.append(" ")
else:
x.append(root)
@vijayv
vijayv / tmux.cheat
Created January 4, 2017 00:04 — forked from afair/tmux.cheat
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &

Keybase proof

I hereby claim:

  • I am vijayv on github.
  • I am gobbledigook (https://keybase.io/gobbledigook) on keybase.
  • I have a public key ASCgqDOmkLPc4XGRKn6F1RKH2-2PYDNNwtsR1vvR6fMYXwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am vijayv on github.
  • I am vijayv (https://keybase.io/vijayv) on keybase.
  • I have a public key ASALHZ63PzB4aJS97lp7AGqx_rgSqlYPzhp-x4rDyYOuZwo

To claim this, I am signing this object: