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
import json | |
import requests | |
import io | |
import base64 | |
import random | |
import sys | |
import datetime | |
from timeit import default_timer as timer | |
from datetime import timedelta | |
from PIL import Image |
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
eyJjb2xsZWN0aW9uX25hbWUiOiJXb3dVcF9leHBvcnRfMTY0MjM4ODYxMTc1MCIsImNsaWVudF90eXBlIjoiUmV0YWlsIiwiYWRkb25zIjpbeyJpZCI6IjY1Mzg3IiwibmFtZSI6IldlYWtBdXJhcyIsInByb3ZpZGVyX25hbWUiOiJDdXJzZSIsInZlcnNpb25faWQiOiIzNTEyOTg2In0seyJpZCI6IjE1OTIiLCJuYW1lIjoiQmFnbm9uIiwicHJvdmlkZXJfbmFtZSI6IkN1cnNlIiwidmVyc2lvbl9pZCI6IjM1NDU1ODcifSx7ImlkIjoiNDY0NiIsIm5hbWUiOiJQYXduIiwicHJvdmlkZXJfbmFtZSI6IkN1cnNlIiwidmVyc2lvbl9pZCI6IjM1NTY0MTEifSx7ImlkIjoiMTAwNjEwIiwibmFtZSI6IldvcmxkIFF1ZXN0IFRyYWNrZXIiLCJwcm92aWRlcl9uYW1lIjoiQ3Vyc2UiLCJ2ZXJzaW9uX2lkIjoiMzU3ODA5NiJ9LHsiaWQiOiIyMDY5NyIsIm5hbWUiOiJHVEZPIiwicHJvdmlkZXJfbmFtZSI6IkN1cnNlIiwidmVyc2lvbl9pZCI6IjM1MjA0OTgifSx7ImlkIjoiNjEyNCIsIm5hbWUiOiJBdWN0aW9uYXRvciIsInByb3ZpZGVyX25hbWUiOiJDdXJzZSIsInZlcnNpb25faWQiOiIzNTIyNTc0In0seyJpZCI6IjE0NTAyIiwibmFtZSI6IlBvc3RhbCIsInByb3ZpZGVyX25hbWUiOiJDdXJzZSIsInZlcnNpb25faWQiOiIzNTE4NzA2In0seyJpZCI6IjEzNDAyIiwibmFtZSI6IkFsdG9ob2xpYyIsInByb3ZpZGVyX25hbWUiOiJDdXJzZSIsInZlcnNpb25faWQiOiIzNTE4NjgyIn0seyJpZCI6IjE0Mzc2IiwibmFtZSI6Ik1hcHN0ZXIiLCJwcm92aWRlcl9uYW1l |
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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft] | |
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment] | |
"CurrentVersion"="1.8" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8] | |
"JavaHome"="C:\\Tools\\Java\\jdk8u192-b12\\jre" | |
"RuntimeLib"="C:\\Tools\\Java\\jdk8u192-b12\\jre\\bin\\j9vm\\jvm.dll" |
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
call plug#begin('~/.vim/plugged') | |
Plug 'tpope/vim-sensible' | |
Plug 'junegunn/vim-easy-align' | |
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } | |
Plug 'crusoexia/vim-monokai' | |
Plug 'vim-airline/vim-airline' | |
Plug 'vim-airline/vim-airline-themes' | |
let g:airline_theme='deus' |
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
(defun untabify-buffer () | |
(interactive) | |
(untabify (point-min) (point-max))) | |
(defun indent-buffer () | |
(interactive) | |
(indent-region (point-min) (point-max))) | |
(defun cleanup-buffer () | |
"Perform a bunch of operations on the whitespace content of a buffer." |
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/sh | |
WHOAMI=$(whoami) | |
if [ "$WHOAMI" != "root" ]; then | |
echo must run as root | |
exit -1 | |
fi | |
HOSTNAME=$(hostname) | |
WC=$(grep $HOSTNAME /etc/hosts | wc -l) |
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
require 'fileutils' | |
LINKED_KEGS_PATH = '/usr/local/Library/LinkedKegs' | |
class Keg | |
def initialize(linked_path) | |
@linked_path = linked_path | |
if linked_path.start_with? '.' | |
@linked_path = File.join(LINKED_KEGS_PATH, linked_path) | |
end |
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
# Assuming you open Terminal at least once a day, add this to your shell profile | |
# (I use zsh, you may require changes for your shell) | |
function brew_update() { | |
brew update | |
brew upgrade --all | |
} | |
CURR_DATE=`date '+%Y-%m-%d'` | |
LAST_DATE=`head -n 1 $HOME/.brew_update_date 2>/dev/null` |
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 <fstream> | |
#include <iomanip> | |
#include <iostream> | |
#include <string> | |
#include <sstream> | |
using std::ifstream; | |
using std::istringstream; | |
using std::string; | |
using std::stringstream; |