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 LRU from "lru-cache" | |
type RateLimitOptions = { | |
uniqueTokenPerInterval: number | |
interval: number | |
} | |
// This rateLimit utility utilizes an lru cache to keep track of | |
// request limits for the API. | |
// |
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
parse_git_branch() { | |
git branch 2>/dev/null | grep \* | sed -ne 's#\* ##p' | awk -F / '{print " [GIT:"$0 "]"}' | |
} | |
export PS1='\[\033[00;32m\]\w\[\033[00m\]$(parse_git_branch)\$ ' | |
########### ALIASES ############## | |
#commands to change window size, big and small | |
alias smw="printf '\033[8;25;100t'" | |
alias lgw="printf '\033[8;50;150t'" | |
#quick edit bash profile |
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
{ | |
"Ansi 6 Color" : { | |
"Green Component" : 0.80000000000000004, | |
"Red Component" : 0.40000000000000002, | |
"Blue Component" : 0.80000000000000004 | |
}, | |
"Tags" : [ | |
"osx", | |
"tomorrow", | |
"night", |
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
https://github.com/flyingrub/scdl | |
Installation (assumes you're on mac osx) | |
1. Open up Terminal | |
2. Follow the directions on this (http://python-guide-pt-br.readthedocs.io/en/latest/starting/install3/osx/) page to install homebrew (think of this like a quick package/application manager for OSX) and python3. | |
It's important that you have python3 (and not python 2.x) | |
3. With step 2 you have homebrew, python3 and pip3 installed |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
#Script to run automated sql queries | |
db_host='localhost' | |
db_port=5432 | |
db_user='postgres' | |
db_pw='' | |
db_name='newsroom' | |
sql_file='loadItems.sql' |
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 | |
# Build-deploy script which looks at the java version defined in a projects pom.xml | |
# and sets the environment java version accordingly then runs a maven build and deploy. | |
# Supports java 1.7 & 1.8 but can easily be extended to support previous and future java | |
# releases. | |
grep "<source>" pom.xml | grep "1.7" >/dev/null | |
if [ $(echo $?) -eq "0" ] | |
then |
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
parse_git_branch() { | |
git branch 2>/dev/null | grep \* | sed -ne 's#\* ##p' | awk -F / '{print " [GIT:"$0 "]"}' | |
} | |
export PS1='\[\033[00;32m\]\w\[\033[00m\]$(parse_git_branch)\$ ' | |
########### ALIASES ############## | |
#commands to change window size, big and small | |
alias smw="printf '\033[8;25;100t'" | |
alias lgw="printf '\033[8;50;150t'" | |
#quick edit bash profile |
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
set ts=4 | |
set autoindent | |
set number | |
set showmode |
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
################################################################################# | |
# Add personal setup here. | |
# give a nickname to this machine for reference purposes on cli | |
export HOSTNICK="rd35" | |
parse_git_branch() { | |
git branch 2>/dev/null | grep \* | sed -ne 's#\* ##p' | awk -F / '{print " [GIT:"$0 "]"}' | |
} |
NewerOlder