Skip to content

Instantly share code, notes, and snippets.

View vinitkumar's full-sized avatar
🧠
Focusing

Vinit Kumar vinitkumar

🧠
Focusing
View GitHub Profile
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
alias c='clear'
alias serve='python manage.py runserver'
alias server='python -m SimpleHTTPServer'
alias fu='git fetch upstream'
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
alias c='clear'
alias serve='python manage.py runserver'
alias server='python -m SimpleHTTPServer'
alias fu='git fetch upstream'
# format for commit message headline
# <type>(<scope>): <subject>
# <BLANK LINE>
# <body>
# <BLANK LINE>
# <footer>
# feature|fix|docs|style|refactor|perf|test|chore(app_name): subject
# Body
import redis
import random
import time
r = redis.StrictRedis(host='localhost', port=6379, db=0)
def write_to_redis_million_times():
for i in range(1000000):
Traceback:
File "/Users/vinitkumar/.virtualenvs/socialschools/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/Users/vinitkumar/.virtualenvs/socialschools/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
244. response = middleware_method(request)
File "/Users/vinitkumar/projects/python/cp/socialschools/apps/multitenant/middleware.py" in process_request
43. request.site = get_site_from_host(request)
print("Hello Dom")
print("Hello world")

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

import React, { Component } from 'react';
import logo from './logo.svg';
import {BrowserRouter as Router, Link} from 'react-router-dom';
import { Route } from 'react-router-dom';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
// class Gist extends Component {
// constructor(props) {
const Box = x =>
({
map: f => Box(f(x)),
fold: f => f(x),
inspect: () => `Box(${x})`
})
const moneyToFloat = str =>
Box(str)
.map(s => s.replace(/\$/g, ''))