Skip to content

Instantly share code, notes, and snippets.

View cortesben's full-sized avatar

Ben cortesben

View GitHub Profile
@cortesben
cortesben / hg-commands.md
Last active January 9, 2024 14:53
Mercurial command cheat sheet

Mercurial Commands

Commands Description
hg pull get latest changes like git pull use flags like -u IDK why yet
hg add only for new files
hg commit add changes to commit with -m for message just like git
hg addremove adds new files and removes file not in your file system
hg incoming see changes commited by others
hg outgoing see local commits
@cortesben
cortesben / terminal-cheat-sheat.md
Last active December 25, 2017 18:14
Terminal cheat sheet

#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 / sublime-shortcuts.md
Last active August 29, 2015 14:17
Sublime shortcuts

#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 / Angular-cli.md
Last active May 28, 2022 15:20
Bash commands and Angular CLI commands

#Angular-cli oh shit!

https://cli.angular.io/reference.pdf

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

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
cortesben / VIMGuide.md
Last active September 6, 2023 14:24
A simple VIM guide

#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 / scrollTo.js
Created December 10, 2016 12:57 — forked from james2doyle/scrollTo.js
a native scrollTo function in javascript that uses requestAnimationFrame and easing for animation
// 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 March 28, 2017 01:01
Bind and call
let person1 = {
name: 'Ben'
}
let person2 = {
name: 'Christina'
}
function logName() {
return this.name;
@cortesben
cortesben / gist:4b384c27d1c714bcaa931c4e8319caa3
Created January 2, 2018 15:19 — forked from vladimirtsyupko/gist:10964772
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master