Skip to content

Instantly share code, notes, and snippets.

View console.log
isZero(0)
zero!
FINALLY
isZero()
not zero
FINALLY
error caught
@adamweeks
adamweeks / .bash_prompt
Created May 2, 2019
Bash prompt that shows current node version and git status
View .bash_prompt
RED_COLOR="\[$(tput setaf 1)\]"
YELLOW_COLOR=""
END_COLOR="\[$(tput sgr0)\]"
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo " ↺ "
}
function __git_branch {
View .bash_profile
#Colorful Terminal
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export CLICOLOR=1
# Aliases
alias ll="ls -al";
alias ..="cd ../";
alias ..l="cd ../ && ll";
alias vb="vim ~/.bash_profile";
alias sb="source ~/.bash_profile";
@adamweeks
adamweeks / fl-amendments.md
Last active Oct 12, 2018
2018 Florida Amendments
View fl-amendments.md
  • Amendment 1: Increased Homestead Property Tax Exemption
    • No - tax cuts for homeowners with nothing equalizing
  • Amendment 2: Limitations on Property Tax Assessments
    • Yes - Reduces volatility in property tax changes
  • Amendment 3: Voter Control of Gambling in Florida
    • No - Limits gambling control and makes everyone vote for existing gambling changes
    • Note: I'm very torn on this one and may change my mind before voting
  • Amendment 4: Voting Restoration
    • Yes - People have paid their debts to society with jail time
  • Amendment 5: Supermajority Vote Required to Impose, Authorize, or Raise State Taxes or Fees
@adamweeks
adamweeks / params.js
Created Jan 6, 2017
eslint-disable-reason
View params.js
// eslint-disable-reason legacy API passes all of these params
// eslint-disable max-params
const processData = (a1, b2, c3, d4, e5) => a1+b2+c3+d4+e5;
@adamweeks
adamweeks / promise-failure.js
Last active Oct 28, 2016
A quick function that returns a failure after 2 seconds.
View promise-failure.js
function testFailure() {
return new Promise((resolve, reject) => {
setTimeout(() => {
reject();
}, 2000);
});
}
View keybase.md

Keybase proof

I hereby claim:

  • I am adamweeks on github.
  • I am adamweeks (https://keybase.io/adamweeks) on keybase.
  • I have a public key whose fingerprint is 4711 16EE 3DDE 01D9 36FE 7E11 749D 236F BECA CB30

To claim this, I am signing this object:

@adamweeks
adamweeks / package.json
Created Jan 21, 2016
NPM Script to eslint against staged changes
View package.json
"scripts": {
"eslint": "eslint -c .eslintrc $(git diff --staged --diff-filter=ACMTUXB --name-only -- '*.js'); exit 0"
}
@adamweeks
adamweeks / javascript.json
Created Jan 15, 2016
ESLint Disable Line snippet for VS Code
View javascript.json
{
"ESLint Disable Line": {
"prefix": "eslignore",
"body": [
"//eslint-disable-line"
],
"description": "Disable ESLint for the given line"
}
}
@adamweeks
adamweeks / ServiceTemplate.js
Created Sep 29, 2015
Angular Service Template for Webstorm
View ServiceTemplate.js
(function() {
'use strict';
angular.module('${moduleName}', [])
.service('${serviceName}', [${serviceName}]);
function ${serviceName}() {
var service = this;
}
})();