Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
1. Open "my.ini" in "C:\xampp\mysql\bin\" directory. | |
2. Edit the following lines. | |
# Add the following code before [client]. | |
default-character-set=utf8 | |
# Add the following code before [mysqld]. | |
character-set-server=utf8 | |
skip-character-set-client-handshake |
<?php | |
class Mailer extends PHPMailer { | |
/** | |
* Save email to a folder (via IMAP) | |
* | |
* This function will open an IMAP stream using the email | |
* credentials previously specified, and will save the email | |
* to a specified folder. Parameter is the folder name (ie, Sent) |
#!/usr/bin/python | |
''' | |
Script to monitor live streams and send an Amazon SNS if the stream is down (and possibly take restorative action) | |
Future: | |
Black detect: ffmpeg -i out.mp4 -vf blackdetect -f null - | |
Note the following doesn't seem to fully work without looking at the debug logs | |
On live ffmpeg -y -i rtmp://cp30129.live.edgefcs.net/live/videoops-videoops@50541 -vf blackdetect -t 10 -loglevel debug -f null - | |
''' |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
<!DOCTYPE html> | |
<meta charset='utf-8'> | |
<head> | |
<title>Cubism + Websockets</title> | |
<script language='javascript' src='d3.min.js'></script> | |
<script language='javascript' src='cubism.v1.js'></script> | |
<script language='javascript'> | |
/* I can never seem to remember: | |
Array.push() appends to the end, and returns the new length |