Skip to content

Instantly share code, notes, and snippets.

View nickzuber's full-sized avatar
🪴
:)

Nick Zuber nickzuber

🪴
:)
View GitHub Profile
@nickzuber
nickzuber / index.js
Created March 22, 2019 21:17
Time Quality Formula created by nickzuber - https://repl.it/@nickzuber/Time-Quality-Formula
const Reset = "\x1b[0m"
const Bright = "\x1b[1m"
const Dim = "\x1b[2m"
const Underscore = "\x1b[4m"
const Blink = "\x1b[5m"
const Reverse = "\x1b[7m"
const Hidden = "\x1b[8m"
const FgBlack = "\x1b[30m"
const FgRed = "\x1b[31m"
@nickzuber
nickzuber / index.js
Created March 22, 2019 16:01
Invitee/Capacity fitting algorithm created by nickzuber - https://repl.it/@nickzuber/InviteeCapacity-fitting-algorithm
const Reset = "\x1b[0m"
const Bright = "\x1b[1m"
const Dim = "\x1b[2m"
const Underscore = "\x1b[4m"
const Blink = "\x1b[5m"
const Reverse = "\x1b[7m"
const Hidden = "\x1b[8m"
const FgBlack = "\x1b[30m"
const FgRed = "\x1b[31m"
@nickzuber
nickzuber / get-previous-branch-history.md
Last active February 21, 2019 16:38
Get a list of all the branches you've been on recently.

Prints the previous branches you've been on.

git reflog |
    grep checkout |
    grep -o -E 'to (.*)' |
    sed -e 's/to/  /' |
    sed -e '1s/   / ∗ /' |
    sed -e '1s/^/git branch history:\'$'\n/' |
 sed -e '1s/$/\'$'\n/' |
/**
* Taken from:
* https://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser/9851769
*/
function getCurrentBrowser () {
// Opera 8.0+
const isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
@nickzuber
nickzuber / zuber.zsh-theme
Last active February 27, 2019 21:10
ZSH Theme
# af-magic.zsh-theme
# Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
if [ $UID -eq 0 ]; then NCOLOFG"009"; else NCOLOR="010"; fi
local return_code="%(?..%{$FG[009]%}%? ↵%{$reset_color%})"
POSTEDIT=$'\e[0m'
function node_version() {
// ====================================
// VIM BINDINGS
// ====================================
"vim.useSystemClipboard": true,
"vim.leader": "<space>",
"vim.statusBarColorControl": true,
"vim.cursorStylePerMode" : {
"visual": "underline",
"visualline": "underline",
"visualblock": "underline",
@nickzuber
nickzuber / verify-me.js
Last active February 25, 2018 04:45
The easiest way to get verified on Twitter
'use strict'
var myFullname = 'Nick Zuber'
// Timeline / Feed
var allTweetNodes = document.querySelectorAll('.FullNameGroup'), i
var userBadgeNode = document.createElement('span')
userBadgeNode.style.fontSize = '13px'
userBadgeNode.className = 'UserBadges'
import redis
import sqlite3
import json
import time
MOCK = {
'num_subjobs': 0,
'status': 'QUEUED',
class CircularDependenciesError(Exception):
pass
data = {
'Module': ['Statement'],
'Script': ['Statement', 'Imports'],
'Program': ['Module', 'Script'],
'Statement': ['Declaration'],
}
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 10.5,
// font family with optional fallbacks