Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
Enough people loved this gist, so it's now a Github repository!
⭐ Please use the "The Events Calendar Reset" on Github going forward. ⭐
#!/usr/bin/env bash | |
# To run this script you need to install https://rclone.org/ first | |
# Use current date and time for future backup folder name | |
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S") | |
# Declare the directory where the temporary backup files will be stored | |
BACKUP_DIR="/backup/$TIMESTAMP/mysql" | |
# State the username for your MySQL / MariaDB instace that can access the neccessary databases | |
MYSQL_USER="" | |
# Point this script to mysql executable file | |
MYSQL=/usr/bin/mysql |
$ mysqldump -u root -p --opt --quote-names --skip-set-charset --default-character-set=latin1 [database name] > dump.sql
$ mysql -u root -p --default-character-set=utf8 [database name] < dump.sql
Source: http://www.garethsprice.com/blog/2011/fix-mysql-latin1-utf-character-encoding/
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
var dummySocket = new ReadWriteNetStream();
// Debug
dummySocket.on('data', function(data){
console.log('write received', data);
});
dummySocket.write('hey !');
#!/usr/bin/env bash | |
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://dash.cloudflare.com/profile/api-tokens | |
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit | |
# If you want to set the root domain instead of a subdomain, set SUBDOMAIN to "@" | |
# Step 2: Create an A record on Cloudflare with the subdomain you chose | |
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created. | |
# Fill in ZONE_ID and REC_ID below | |
# This step is optional, but will save you 2 requests every time you run this script | |
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating. |