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
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;
View vimrc
syntax on
set number
filetype plugin indent on
set tabstop=2 shiftwidth=2 expandtab
set backspace=indent,eol,start
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);
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 / bind.js
Last active Mar 28, 2017
Bind and call
View bind.js
let person1 = {
name: 'Ben'
let person2 = {
name: 'Christina'
function logName() {
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
Math.easeInOutQuad = function (t, b, c, d) {
t /= d/2;
if (t < 1) {
return c/2*t*t + b
return -c/2 * (t*(t-2) - 1) + b;
cortesben /
Last active Nov 11, 2018
A simple VIM guide

#VIM Simple VIM commands Use as a refernace for basic commands in VIM/VI

Commands Description
esc toggle between command mode or edit mode
shift : enter command mode

Git Commands

Practical git commands, this will be updated as needed and by needed I mean as I need to remember things I don't know

Commands Description
git --version git version
git checkout [branchname] go to branch **first step before any work is done
git status check status of git repositories
git checkout -b [branchname] create new branch from current branch
git branch -D [branchname] delete local branch
cortesben /
Last active Apr 4, 2020
Bash commands and Angular CLI commands

#Angular-cli oh shit!

Commands Description
ng help returns all commands with flags they can take as a param
ng new [project-name] create a brand new angular project with live server BANG!
ng init grabs name from folder that already exist
You can’t perform that action at this time.