git fetch --prune && git branch -vv | grep ': gone]' | awk '{print $1}' | xargs -r git branch -d
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
{ | |
"Create public function": { | |
"prefix": "pubf", | |
"body": [ | |
"public function $1()", | |
"{", | |
"\t$2", | |
"}", | |
], | |
"description": "Create public function" |
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
<VirtualHost *:80> | |
ServerName laravelexample.net | |
ServerAdmin [email protected] | |
DocumentRoot /var/www/laravelexample/public | |
<Directory /var/www/laravelexample> | |
AllowOverride All | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined |
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
const el = document.querySelector('[style*=waska]') | |
const parent = el.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement; | |
const futureDate = new Date('2022-06-28 12:00:00') | |
const startDate = new Date('2022-05-19'); | |
const interval = setInterval(() => { | |
const nowDate = Date.now(); | |
const percent = Math.round((futureDate.getTime() - nowDate) * 100 / (futureDate.getTime() - startDate.getTime()) * 100) / 100 | |
console.log(percent) | |
if (percent <= 5) { |
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
# You must run this file with sudo | |
a2dismod php8.3 | |
a2enmod php8.4 | |
service apache2 restart | |
update-alternatives --set php /usr/bin/php8.4 | |
update-alternatives --set phar /usr/bin/phar8.4 | |
update-alternatives --set phar.phar /usr/bin/phar.phar8.4 |
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
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; | |
CREATE DATABASE database_name DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
GRANT ALL PRIVILEGES on database_name.* TO 'user'@'localhost'; | |
FLUSH PRIVILEGES; |
Object.prototype.numberKeys = function(){
// ...
};
Array.prototype.minElement = function(){
// ...
};
apt-get install libapache2-mod-ruid2
a2enmod mpm_prefork
service apache2 restart
service php7.0-fpm restart
cp /etc/php/7.0/fpm/pool.d/www.conf /etc/php/7.0/fpm/pool.d/{YOUR_DOMAIN_NAME}.conf
vim /etc/php/7.0/fpm/pool.d/{YOUR_DOMAIN_NAME}.conf
and change the parameters