I hereby claim:
- I am timwright12 on github.
- I am timwright12 (https://keybase.io/timwright12) on keybase.
- I have a public key ASAgVkzSQwMbH3ljfBAfqLK3fbQ7E23nFVt1ZLHcuIhPjQo
To claim this, I am signing this object:
| # PATH updates | |
| export NVM_DIR=~/.nvm | |
| export PATH="/usr/local/opt/ruby/bin:$PATH" | |
| source $(brew --prefix nvm)/nvm.sh | |
| # Terminal Alias | |
| NEWLINE=$'\n' | |
| ME=$'tim' | |
| PROMPT="${NEWLINE}%B%F{white}%1~%f%b${NEWLINE}[%m][${ME}] -> " |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| runCmd() { | |
| echo "" | |
| echo ">>> $@" | |
| echo "" | |
| eval "$@" | |
| local code=$? | |
| [[ $code -ne 0 ]] && return $code | |
| } |
| # Terminal Alias | |
| PS1='\n\W\n[\h][\u] -> ' | |
| # Command alias | |
| alias edithosts='sudo vi /private/etc/hosts' | |
| alias editbash='atom-beta ~/.bash_profile' | |
| alias phpserver='php -S localhost:8000' | |
| alias pythonserver='python -m SimpleHTTPServer 8888' | |
| alias npm-remove-packages='rm -rf node_modules/ && rm -rf package-lock.json' | |
| alias npm-reset-packages='rm -rf node_modules/ && rm -rf package-lock.json && npm install' |
| /** | |
| * Get URL params | |
| * | |
| * @param {String} query - The location.search query | |
| * @returns {Object} - the params | |
| */ | |
| export const getUrlParams = ( query ) => { | |
| const vars = query.split( '&' ); | |
| const queryString = {}; |
| /** | |
| * @file A simple Ajax call that will work down to IE10 | |
| * @author Tim Wright | |
| * @license MIT | |
| * @example ajaxCall({ 'url' : 'http://...', 'type' : 'GET', 'data' : 'json' }, function( data ){ /callback function here/ }); | |
| */ | |
| ( function ( global ) { | |
| 'use strict'; |
| /** @function | |
| * @name debounce | |
| * @description Utility method for debouncing the resize event | |
| * @param {function} func | |
| * @param {number} wait | |
| * @param {object} immediate | |
| * @example var myEfficientFn = debounce(function() { things to do }, 250); | |
| * @example window.addEventListener( 'resize', myEfficientFn ); | |
| */ |
| # Terminal Alias | |
| PS1='\n\W\n[\h][\u] -> ' | |
| # PATH updates | |
| PATH=$PATH:/usr/local/bin | |
| PATH=/usr/local/bin:$PATH | |
| export PATH=~/.composer/vendor/bin:$PATH | |
| # Command alias | |
| alias edithosts='sudo vi /private/etc/hosts' |
| /* | |
| * Bookmarklet is an external script for sharing content Via wordpress | |
| * It was specifically designed for csskarma.com, but feel free to nab it. | |
| * | |
| * Bookmarklet content ( NOTE: change the URL path ): | |
| * | |
| * javascript:(function ()%7Bvar jsCode %3D document.createElement(%27script%27)%3BjsCode.setAttribute(%27src%27, %27https://csskarma.com/js/bookmarklet.js%27)%3Bdocument.body.appendChild(jsCode)%3B %7D())%3B | |
| * | |
| */ |