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
$("a[href^='#']").click(function(e) { | |
e.preventDefault(); | |
var position = $($(this).attr("href")).offset().top; | |
$("body, html").animate({ | |
scrollTop: position | |
} /* speed */ ); | |
}); |
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
rm -rf public_html/ #delete | |
ln -s /home/my-user-wherever/site/public/ public_html #symlink |
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
/opt/php71/bin/php /opt/cpanel/composer/bin/composer install |
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
<?php | |
// Get Base URI | |
$baseUri = str_replace($_SERVER['DOCUMENT_ROOT'], '', dirname($_SERVER['SCRIPT_FILENAME'])); | |
$http = str_replace(array('/', '\\'), '/', $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['HTTP_HOST'] . $baseUri . '/'); | |
$catalog = explode('/', $http); | |
array_pop($catalog); | |
array_pop($catalog); | |
$catalog = implode('/', $catalog) . '/'; |
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
for i in */; do zip -r "${i%/}-`date '+%d-%m-%Y'`.zip" "$i"; 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
##### LOCAWEB - NAO REMOVER ##### | |
AddHandler php71-script .php | |
suPHP_ConfigPath /home/yourPath/ | |
##### LOCAWEB - NAO REMOVER ##### |
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
cd /var/www/image | |
#For file like image you don't need execution permission : | |
sudo chmod 664 * | |
#If you have directories inside image and you want to apply permission : | |
sudo find . -type d -exec chmod 755 "{}" \; | |
#This will recursively search your directory and chmod 755 all directories only. |
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
#!/usr/bin/env bash | |
# Run this as sudo! | |
# I move this file to /usr/local/bin/vhost and run command 'vhost' from anywhere, using sudo. | |
# | |
# Show Usage, Output to STDERR | |
# | |
function show_usage { | |
cat <<- _EOF_ |
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
sudo apt-get install python-software-properties && software-properties-common | |
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
var css = document.getElementsByClassName("esg-click-to-play-video"); | |
var y = 0; | |
var x = 0; | |
function colority() { | |
if (css[x] != null) { | |
css[x].style.background = cores[y]; | |
} | |
x++; | |
y++; | |
if (y > cores.length) { |