This file contains 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
Read this somewhere earlier about using wireguard-go and cli to activate/deactivate wireguard working perfectly on Ventura while the Appstore wireguard app was not working properly. | |
1) Install wireguard-go and wireguard-tools with brew in terminal: | |
brew install wireguard-go wireguard-tools | |
2) Create the wireguard config directory and move your config file (exported from the Appstore wireguard app) to that directory: | |
sudo mkdir /usr/local/etc/wireguard |
This file contains 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
npm install pm2@latest -g | |
pm2 start "node --env-file=.env dist/server.js" --name ws-satchel | |
pm2 list | |
pm2 stop ws-satchel | |
pm2 restart ws-satchel | |
pm2 logs ws-satchel | |
pm2 delete ws-satchel | |
Auto-start on Server Reboot: To ensure your Node.js app starts automatically when the server reboots, run this command: | |
pm2 startup |
This file contains 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 systemctl start supervisord | |
sudo systemctl enable supervisord | |
sudo supervisorctl reread | |
sudo supervisorctl update | |
sudo supervisorctl start websockets | |
sudo supervisorctl status | |
Monitor Logs | |
tail -f /var/www/html/storage/logs/websockets.log |
This file contains 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
/* Slick needs no get Reinitialized on window Resize after it was destroyed */ | |
$(window).on('load resize orientationchange', function() { | |
$('.carousel').each(function() { | |
var $carousel = $(this); | |
/* Initializes a slick carousel only on mobile screens */ | |
// slick on mobile | |
if ($(window).width() > 768) { | |
if ($carousel.hasClass('slick-initialized')) { | |
$carousel.slick('unslick'); | |
} |
This file contains 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 foo = ( | |
bar === 'a' ? 1 : // if | |
bar === 'b' ? 2 : // else if | |
bar === 'c' ? 3 : // else if | |
null // else | |
); |
This file contains 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
SELECT * FROM `wp_posts` ORDER BY `wp_posts`.`post_date` DESC | |
Drop column | |
ALTER TABLE wp_posts DROP COLUMN Created; | |
Add column | |
ALTER TABLE wp_posts ADD COLUMN post_author INT DEFAULT 1 AFTER ID; | |
Rename column | |
ALTER TABLE wp_posts CHANGE COLUMN LastEdited post_date DATETIME; |
This file contains 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
If the resource limit can't be removed by the hosting provider, you could consider using git config to disable preloading of the index (threaded lstat). | |
git config core.preloadIndex false | |
If you need that setting when cloning the initial repository, then you will need to set it globally. | |
git config --global core.preloadIndex false |
This file contains 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. Add the folder path to your repo's root .gitignore file. | |
path_to_your_folder/ | |
Step 2. Remove the folder from your local git tracking, but keep it on your disk. | |
git rm -r --cached path_to_your_folder/ | |
Step 3. Push your changes to your git repo. |
This file contains 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 /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/123 | |
sudo killall Finder | |
sudo lsof +D "/Volumes/123” | |
mdutil -i off -d /Volumes/123/ | |
rm -r /Volumes/123/.Spotlight-V100/Store-V2/ |
This file contains 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
navigate to C:\Users\\ and open .yarnrc and manually update it as follows: | |
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
strict-ssl false |
NewerOlder