Skip to content

Instantly share code, notes, and snippets.

Chance Smith chancesmith

Block or report user

Report or block chancesmith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
chancesmith / index.html
Created Aug 20, 2018
simple css spinner
View index.html
<div class="spinner"></div>
chancesmith /
Last active Feb 6, 2018
Wordpress Setup shell script

Setup Instructions

  • add to your home directory
  • in terminal $ chmod +x so we can execute this without admin permissions needed
  • add an alias in your terminal profile and source the profile...(see command in next step)
  • $ echo '\n\n alias wpsetup="~/"' >> ~/.zshrc && . ~/.zshrc


Now, when you are ready run $ wpsetup in the folder you want to setup Wordpress locally in.

View lazy-load-images.js
// #1 using the spread operator get all our images with the class 'lazyload'
const imgElements = [...document.querySelectorAll('.adg-lazy-image')]
// IE browser support :(
var isIE;
(function() {
var ua = window.navigator.userAgent,
msie = ua.indexOf('MSIE '),
trident = ua.indexOf('Trident/')
chancesmith / .hyper.js
Last active Oct 17, 2017
hyper terminal settings
View .hyper.js
// Future versions of Hyper may add additional config options,,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 18,
// font family with optional fallbacks
chancesmith / animate.js
Created Sep 12, 2017
Animate elements in and out on scroll
View animate.js
// onScroll animation
$(function() {
var $window = $(window),
isTouch = Modernizr.touch;
if (isTouch) { $('.add-animation').addClass('animated'); }
$window.on('scroll', revealAnimation);
chancesmith / main.js
Last active Sep 5, 2017
ToysRUs price drop percentage
View main.js
// test page:
// just copy this code in the console on a page
// that has all items with a price drop
var items = document.getElementsByClassName('product-item')
//var prices = items.getElementsByClassName('product-price')
var collection = []
for (var i=0; i<items.length; i++) {
// get link of item
var productLink = items[i].href
var productName = items[i].getElementsByClassName('product-item__product-title')[0].textContent
chancesmith / .zshrc
Last active Feb 13, 2018
ZSH profile
View .zshrc
plugins=(git sublime cloudapp node npm osx extract z)
# User configuration
# Remap alt-left and alt-right to forward/backward word skips.
# via @waltz,
bindkey "^[^[[D" backward-word
bindkey "^[^[[C" forward-word
# export MANPATH="/usr/local/man:$MANPATH"
chancesmith /
Last active Mar 21, 2018
Setup Mac Computer Guide for Website Developement
chancesmith / .profile
Created May 10, 2017
personal .profile preferences
View .profile
alias work='cd ~/work-in-progress/'
alias home='cd ~'
## get rid of command not found ##
alias cd..='cd ..'
## a quick way to get out of current directory ##
alias ..='cd ..'
alias editprofile= 'subl ~/.bash_profile && subl ~/.profile'
chancesmith /
Last active Apr 7, 2017 — forked from mindmergedesign/st3_sync
Sync Sublime Text 3 Packages and Settings with Dropbox

Sync ST3 Packages & Settings with Dropbox or Encore

Inital setup from main computer

Create the sync directory in Dropbox

  • $ mkdir ~/Dropbox/sublime-text-3

Move your ST3 "Packages" and "Installed Packages" to Dropbox

  • $ cd ~/Library/Application\ Support/Sublime\ Text\ 3
  • $ mv Packages/ ~/Dropbox/sublime-text-3
  • $ mv Installed\ Packages/ ~/Dropbox/sublime-text-3
You can’t perform that action at this time.