Skip to content

Instantly share code, notes, and snippets.

@victornpb
victornpb / deleteDiscordMessages.js
Last active July 9, 2024 07:46
Delete all your messages from DM or Channel in Discord
/*
This file is now hosted here:
https://github.com/victornpb/undiscord
*/
@BrianRossmajer
BrianRossmajer / gist:e82e9944d2b246587be4baa9aeac3b98
Created December 26, 2017 14:48
Using sshfs high-speed no-encryption
http://pl.atyp.us/wordpress/index.php/2009/09/file-transfer-fun/
File Transfer Fun
17 September, 2009 8:32 am
I’ve written before about the extreme usefulness of sshfs for accessing files remotely without having to install server software. It continues to be an important part of my toolbox, as does its cousin CurlFtpFS which – unlike sshfs – I can even use to mount a directory here on my web host. Of course, either becomes even more useful when combined with some easy method of synchronization. You probably have rsync already. You can also use Unison if you need bidirectional synchronization – which you generally will if you’re trying to use a single directory somewhere as a “drop box” to share between multiple machines.
I just found another sshfs trick today. If the connection between your two machines is already secure – e.g. on the same private network or connected via a secure VPN/tunnel – you might want to avoid an extra round of encryption and decryption by using the “-o directport” option to sshfs. T
@ysasaki
ysasaki / cloudwatch-php-fpm-status.sh
Last active August 24, 2023 11:30
php-fpm status to AWS CloudWatch
#!/bin/bash
AWS_DEFAULT_REGION="ap-northeast-1"
AWS_ACCESS_KEY_ID="YOUR ACCESS KEY HERE"
AWS_SECRET_ACCESS_KEY="YOUR SECRET ACCESS KEY HERE"
INSTANCE_ID_URL="http://169.254.169.254/latest/meta-data/instance-id"
INSTANCE_ID=$(curl -s ${INSTANCE_ID_URL})
SERVER_STATUS_URL="http://localhost/php-fpm-status"