This file contains hidden or 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
du -sch .[!.]* * |sort -h |
This file contains hidden or 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
# Step 1: open terminal. | |
# Step 2: nano ~/.bash_profile | |
# Step 3: Add the following code below | |
alias my-ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2' | |
# Step 4: save file and restart terminal. |
This file contains hidden or 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
UPDATE user | |
SET img = REPLACE('https://randomuser.me/api/portraits/men/?.jpg', '?', FLOOR((RAND() * (50-20+1))+20)) |
This file contains hidden or 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
_getCityState = function(resp){ | |
var res = ''; | |
if (resp.status == 'OK') { | |
if (resp.results[1]) { | |
var city=false,state=false; | |
for (var i = 0; i < resp.results.length; i++) { | |
if ((!city || !state) && resp.results[i].types[0] === "locality") { | |
city = resp.results[i].address_components[0].short_name, | |
state = resp.results[i].address_components[2].short_name; | |
res = city + ", " + state; |
This file contains hidden or 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
/*========== App CSS here ==========*/ | |
/*========== 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 hidden or 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
#!/bin/bash | |
echo "Updating upstream forked repository." | |
git remote add upstream git@GIT_REPOSITORY_URL.git | |
git fetch upstream | |
git pull upstream master | |
echo "Done! :)" |
This file contains hidden or 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
branch=$(git symbolic-ref --short -q HEAD) | |
git pull origin $branch | |
git push origin $branch | |
for environment in "$@" | |
do | |
echo "Merging environment $environment" | |
git checkout $environment | |
git pull origin $environment | |
git merge $branch | |
git push origin $environment |