Skip to content

Instantly share code, notes, and snippets.

View wyyr's full-sized avatar

Low wyyr

  • Indonesia
View GitHub Profile
@wyyr
wyyr / fixpm2aapanel
Created February 1, 2022 14:20 — forked from derakula/fixpm2aapanel
Fix PM2 Manager empty after server restart on AAPANEL
> /etc/systemd/system/pm2-undefined.service
Change User=undefined
To User=root
> /www/server/panel/plugin/pm2/pm2_main.py
change 'pm2 save && pm2 startup'
to 'pm2 cleardump && pm2 save && pm2 startup -u root'
@wyyr
wyyr / countries.sql
Created April 15, 2021 13:59 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@wyyr
wyyr / upload.js
Created March 7, 2021 13:25 — forked from virolea/upload.js
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@wyyr
wyyr / laravel-queue-worker.pm2.yml
Created February 23, 2021 06:23 — forked from vector-kerr/laravel-queue-worker.pm2.yml
Laravel Queue Worker PM2 Application Definition
#
# This file provides an application definition that can be used with
# PM2 ("Production Process Manager").
#
# PM2 "allows you to keep applications alive forever, to reload them
# without downtime and to facilitate common system admin tasks."
#
# Use this file by running it with PM2. For example:
# $> pm2 start laravel-queue-worker.pm2.yml
#