Skip to content

Instantly share code, notes, and snippets.

Ben cortesben

Block or report user

Report or block cortesben

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
View sublime-shortcuts.md

#Sublime Shortcuts

###This is going to be a personal cheatsheat of sublime shortcuts I will be creating

Commands Description
Shift + Command + A Find what code wraps around child tags
@cortesben
cortesben / scrollTo.js
Created Dec 10, 2016 — forked from james2doyle/scrollTo.js
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
View scrollTo.js
// easing functions http://goo.gl/5HLl8
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
}
t--;
return -c/2 * (t*(t-2) - 1) + b;
};
@cortesben
cortesben / bind.js
Last active Mar 28, 2017
Bind and call
View bind.js
let person1 = {
name: 'Ben'
}
let person2 = {
name: 'Christina'
}
function logName() {
return this.name;
@cortesben
cortesben / terminal-cheat-sheat.md
Last active Dec 25, 2017
Terminal cheat sheet
View terminal-cheat-sheat.md

#cheat sheet for random BASH Stuff Safe reference for random commands. I will break this up into a better guide in the near future.

#Heroku commands

Commands Description
heroku local web Run the app locally
git push heroku master Deploy to Heroku
heroku open open Browser with app location from command line
@cortesben
cortesben / gist:4b384c27d1c714bcaa931c4e8319caa3
Created Jan 2, 2018 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
View gist:4b384c27d1c714bcaa931c4e8319caa3
git fetch --all
git reset --hard origin/master
git pull origin master
@cortesben
cortesben / getColorNewTab
Created Apr 11, 2018
get the colors from pallet lab tab in chrome
View getColorNewTab
var colors = document.querySelectorAll('.sweet-color');
colors.forEach(e => {
let styles = window.getComputedStyle(e);
console.log(styles["background-color"]);
});
View vimrc
syntax on
set number
filetype plugin indent on
set tabstop=2 shiftwidth=2 expandtab
set backspace=indent,eol,start
@cortesben
cortesben / VIMGuide.md
Last active Nov 11, 2018
A simple VIM guide
View VIMGuide.md

#VIM Simple VIM commands Use as a refernace for basic commands in VIM/VI https://vimgifs.com/

Commands Description
esc toggle between command mode or edit mode
shift : enter command mode
@cortesben
cortesben / preparePackageForNPM.js
Last active Dec 2, 2019
Prepare for npm publish
View preparePackageForNPM.js
const path = require('path');
const fs = require('fs');
const file = path.join(__dirname, '../' + process.argv[2]);
const fileJSON = require(file);
delete fileJSON.dependencies;
delete fileJSON.eslintConfig;
delete fileJSON.devDependencies;
delete fileJSON.scripts;
You can’t perform that action at this time.