Skip to content

Instantly share code, notes, and snippets.

View 02Tea's full-sized avatar
🥴

Austin Nicomedez 02Tea

🥴
View GitHub Profile
http_port 3128
cache deny all
hierarchy_stoplist cgi-bin ?
access_log none
cache_store_log none
cache_log /dev/null
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
@02Tea
02Tea / rsync_remote_to_local_vice_versa.sh
Last active July 8, 2021 06:41
[rsync remote to local vice versa] #rsync #bash #migrate #pv #progress #ssh
# Local to Remote: rsync [OPTION]... -e ssh [SRC]... [USER@]HOST:DEST
# Remote to Local: rsync [OPTION]... -e ssh [USER@]HOST:SRC... [DEST]
# remote -> local
rsync -havz -e ssh user@12.12.12.12:/var/wwww/livesite/ /var/www/localsite/
# local -> remote
rsync -havz -e ssh /var/www/localsite/ user@12.12.12.12:/var/www/livesite/
# dry run
@02Tea
02Tea / multifile_search_from_root_folder_using_grep.sh
Created April 2, 2020 00:53
[Multifile search from root folder using grep] #grep #bash #shell
grep -R 'class="close-btn"' .
# limiting searches to files with a specific extension
grep '.ad' **/*.css
# grepping inside vim
:grep -F '.ad' **/*.css
@02Tea
02Tea / greet_differently_on_the_time_of_day.sh
Created March 29, 2020 23:51
[Greet differently on the time of day] #bash #bashrc #zsh #zshrc #sh #date #til
# http://patorjk.com/software/taag/#p=display&f=Bloody&t=Good%0AEvening
h=`date +%H`
if [ $h -lt 12 ]; then
echo '
▄████ ▒█████ ▒█████ ▓█████▄
██▒ ▀█▒▒██▒ ██▒▒██▒ ██▒▒██▀ ██▌
▒██░▄▄▄░▒██░ ██▒▒██░ ██▒░██ █▌
░▓█ ██▓▒██ ██░▒██ ██░░▓█▄ ▌
@02Tea
02Tea / media_queries_break_points.scss
Created March 26, 2020 19:59
[Media Queries Break Points] #css #scss #css_mediaqueries #css_breakpoints #rwd
// ============================================
// Media Break Points
// Usage: @media #{$small-screen} { code here }
// ============================================
$smaller-only-screen: "only screen and (max-width : 20em)";
$small-only-screen: "only screen and (max-width : 45em)";
$small-screen: "only screen and (min-width : 30em)";
$medium-screen: "only screen and (min-width : 45em)";
$large-screen: "only screen and (min-width : 60em)";
@02Tea
02Tea / search_replace_db_cli.md
Created June 6, 2019 16:19
[Search Replace DB CLI] #srdb #database #cli #mysql #mariadb

Dry run

php srdb.cli.php -h <172.21.0.4> -n <database_name> -u <database_user> -p <database_password> --port <database_port> -s <search_string> -r <replace_query> -z

Run

php srdb.cli.php -h <172.21.0.4> -n <database_name> -u <database_user> -p <database_password> --port <database_port> -s <search_string> -r <replace_query>
@02Tea
02Tea / watermelonBMTest.js
Last active April 2, 2018 04:46
[Watermelon BM test] #javascript
javascript:(function(){"use strict";function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++)o[t]=e[t];return o}return Array.from(e)}function Watermelon(e){var t=[],o=void 0,r=void 0,n={colors:5,threshold:255},a=e?e:n,l={position:"absolute",width:"100%",height:"100%","z-index":99999},i={display:"inline-block",position:"relative","margin-bottom":"-5px",height:"100%",width:a.size+"%",transition:"all 0.3s ease"},c=function(e){return console.log(e)},d=function(){var e=50+Math.floor(Math.random()*a.threshold),t=50+Math.floor(Math.random()*a.threshold),o=50+Math.floor(Math.random()*a.threshold);return"rgb( "+e+", "+t+", "+o+" )"},s=function(e){var t="";for(var o in e)e.hasOwnProperty(o)&&(t+=o+":"+e[o]+";");return t},u=function(e,t,o){var r=o|t<<8|e<<16;return"#"+(16777216+r).toString(16).slice(1)},m=function(e){return e.substring(4,e.length-1).replace(/ /g,"").split(",")},p=function(){document.getElementById("exocarp")&&document.getElementById("exocarp").remove();var e=docum
@02Tea
02Tea / rdesktop.md
Last active March 11, 2018 19:10
[rdesktop] remote desktop tool #tools #linux #windows

90% of actual screen size

rdesktop -u <username> -g 90% <ipaddress>

fullscreen

rdesktop -z -P -f -u <username> <ipaddress>

folder sharing

@02Tea
02Tea / watch-http-server.md
Created January 15, 2018 06:38
[watch-http-server] livereload your projects locally #npm #tools
@02Tea
02Tea / laravel-permission.md
Last active May 6, 2021 09:58
[Laravel Permission Issue] resolve permission issue #laravel #php #permission #chown #grep
# root
php artisan cache:clear
php -i | grep USER
chown -R www-data:www-data storage