This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh into de the homestead box | |
execute: serve domain.app /home/vagrant/Code/path/to/public/directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*========== Mobile First Method ==========*/ | |
/* Custom, iPhone Retina */ | |
@media only screen and (min-width : 320px) { | |
} | |
/* Extra Small Devices, Phones */ | |
@media only screen and (min-width : 480px) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To list all the files in a commit: | |
git diff-tree --no-commit-id --name-only -r <commit-sha> | |
To edit/undo last commit | |
git commit -m "Something terribly misguided" | |
git reset HEAD~ | |
<< edit files as necessary >> | |
git add ... | |
git commit -C ORIG_HEAD // keep same commit message | |
git commit -c ORIG_HEAD // edit commit message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target="_blank" rel="noopener noreferrer" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngrok http -bind-tls=true -host-header=rewrite 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lsof -i tcp:3000 | |
# to kill the process | |
kill -9 PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i audio-input-name.mp3 -ac 2 -codec:a libmp3lame -b:a 48k -ar 16000 audio-output-name.mp3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPaginatedItems(items, page, pageSize) { | |
var pg = page || 1, | |
pgSize = pageSize || 100, | |
offset = (pg - 1) * pgSize, | |
pagedItems = _.drop(items, offset).slice(0, pgSize); | |
return { | |
page: pg, | |
pageSize: pgSize, | |
total: items.length, | |
total_pages: Math.ceil(items.length / pgSize), |