- Install iTerm2 from https://www.iterm2.com/
- Install oh-my-zsh from https://ohmyz.sh/ or https://github.com/robbyrussell/oh-my-zsh
- Set iTerm2 theme tab theme to Dark -
Preferences | Appearance | Tabs | Theme > Dark
- Install Fira Code fonts from https://github.com/tonsky/FiraCode (Clone and navigate to
dstr > ttf
, install all font files by double clicking) - Install Powerline fonts from https://github.com/powerline/fonts
- Set fonts for iTerm2 -
Preferences | Profiles | Text
- Change
Font
to14pt Fira code regular
and CheckUse Ligatures
checkbox - Change
Non ASCII Font
to14pt Fira mono
and CheckUse Ligatures
checkbox
- Change
- Install iTerm2 snazzy theme from https://github.com/sindresorhus/iterm2-snazzy
- Navigate to
Preferences | Profiles | Color Presets > Snazzy
- Navigate to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# This little script creates users in an airflow instance so it can be open to the public. | |
# It gets the password in plain text so be careful where you run it. | |
# You can properly invoke the script as follows: | |
# ./add_user.py <username> <[email protected]> <secretpassword> | |
import airflow, sys | |
from airflow import models, settings | |
from airflow.contrib.auth.backends.password_auth import PasswordUser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <sys/epoll.h> | |
#include <sys/types.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. Improve the Counter class in Section 5.1, "Simple Classes and Parameterless | |
// Methods," on page 51 so that it doesn't turn negative at Int.MaxValue. | |
class Counter { | |
private var value = 0 | |
def increment() { if(value < Int.MaxValue) value += 1 } | |
def current = value | |
def isLess(other: Counter) = value < other.value // can access private field of other object | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request'); | |
var unzip = require('unzip'); | |
var csv2 = require('csv2'); | |
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
.pipe(unzip.Parse()) | |
.on('entry', function (entry) { | |
entry.pipe(csv2()).on('data', console.log); | |
}) | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_table(items, header=None, wrap=True, max_col_width=20, wrap_style="wrap", row_line=False, fix_col_width=False): | |
''' Prints a matrix of data as a human readable table. Matrix | |
should be a list of lists containing any type of values that can | |
be converted into text strings. | |
Two different column adjustment methods are supported through | |
the *wrap_style* argument: | |
wrap: it will wrap values to fit max_col_width (by extending cell height) | |
cut: it will strip values to max_col_width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[isayme] | |
text(bold)=eaeaea | |
magenta(bold)=ff00ff | |
text=ffffff | |
white(bold)=eaeaea | |
green=00c000 | |
red(bold)=d20000 | |
green(bold)=00ff00 | |
black(bold)=808080 | |
red=c00000 |
NewerOlder