-
A database for 2022 (hn) (Tailscale uses SQLite)
-
I'm all-in on server-side SQLite (hn) (Fly.io acquires Litstream)
#!/bin/bash | |
# Sample App Init script for running sample app daemon | |
# | |
# chkconfig: - 98 02 | |
# | |
# description: Sample Application Upstart, using Forever | |
APPHOME=/opt/sample-app | |
APPSCRIPT=app.js |
#!/bin/bash | |
#Show instructions | |
function show_usage { | |
echo "Backup account and database, assuming /home/USER filesystem setup." | |
echo "Usage:" | |
echo " -h Help menu - See this information" | |
echo " Files: " | |
echo " -a Account user name, for use in /home/USER backup. If no path is set via -p flag, the /home/USER path will be backed up. " | |
echo " -f Filepath to Backup " |
#!/usr/bin/env bash | |
# Bash script to automate Vim+Tmux install as written about here: | |
# http://fideloper.com/mac-vim-tmux | |
# Test if Git is installed. | |
# Installing Git is not the job of this script | |
git --version 2>&1 >/dev/null | |
GIT_IS_INSTALLED=$? |
############################################################################# | |
## data source definitions | |
############################################################################# | |
source users | |
{ | |
# data source type. mandatory, no default value | |
# known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc | |
type = mysql |
#You should do all your LAMP development in a Virtual Machine
##Here's Why:
Many of us develop on Macintoshes. There are many reasons for this, but one of them is that it's based on a Unix platform of some sort. This allows us to run common server software such as Apache, Ruby, Python and Nodejs on our Macs.
Our computers become powerful develoment machines similar to the servers our apps will eventually live on.
Sometime we start our computer only to find Apache won't start, or MySQL can't create a PID file, or we've updated to Mountain Lion and Apache needs to be reconfigured. Death!
#!/usr/bin/env bash | |
# 5 minutes between alerts | |
SECONDS_BETWEEN_ALERTS=300 | |
# Track when we sent the last alert | |
LAST_ALERT=0 | |
while true; do | |
NUMBER_CONNECTIONS=$(mysql --defaults-extra-file=/data/.prod.cnf -sNe "select count(*) as connection_count from INFORMATION_SCHEMA.PROCESSLIST;") |
Each query in MySQL is running as its own transaction, assuming you didn't change this default configuration, and unless you're starting a transaction manually and running multiple deletes in that one transaction.
Because every query is a transaction, MySQL has to save the data being deleted in case of a rollback. Large deletes means saving a TON of data for that potential case.
Additionally, deletes cause a LOT of writes to the binary log. When the delete completes, the query/results of the delete are committed to the binary log,
<?php | |
/* | |
Note that this does not use app icons or links in Timeline post. Some messaging is therefor lost. | |
*/ | |
require 'fb/src/facebook.php'; | |
$facebook = new Facebook(array( | |
'appId' => 'SOME_APP_ID', |