Skip to content

Instantly share code, notes, and snippets.

View chaance's full-sized avatar
🏄‍♂️
Out there

Chance Strickland chaance

🏄‍♂️
Out there
View GitHub Profile
@chaance
chaance / semantic-commit-messages.md
Last active June 29, 2022 13:58 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@chaance
chaance / localwp
Created February 25, 2018 18:11 — forked from anonymous/localwp
Quickly CD into working WP theme directory
## Add to your bash or zsh profile
## Modify path to match where you keep your local WP installs
## Your install and theme names should match!
function localwp() {
cd ~/Desktop/local/"$@"/app/public/wp-content/themes/"$@"
}
## To use, type `localwp themename` (replace themename obvi)
## Now you’re in your theme directory! Yay!
Array.prototype.shuffle = function() {
var i = this.length, // array length to determine current index in loop
r, // random index value
p; // current index value
// Loop through array indicies
while ( i-- ) {
// always returns less than the index to ensure it always exists
r = Math.floor( Math.random() * i );