Skip to content

Instantly share code, notes, and snippets.

function getTestPersonaLoginCredentials(cb) {
http.get({
host: 'personatestuser.org',
path: '/email'
}, function(res) {
// explicitly treat incoming data as utf8 (avoids issues with multi-byte chars)
res.setEncoding('utf8');
// incrementally capture the incoming response body
@8kigai
8kigai / wp.sh
Created October 22, 2015 08:08 — forked from phlbnks/wp.sh
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Do you need to setup new MySQL database? (y/n)"
read -e setupmysql
if [ "$setupmysql" == y ] ; then
echo "MySQL Admin User: "
read -e mysqluser
@8kigai
8kigai / wp.sh
Created October 22, 2015 08:08 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@8kigai
8kigai / hhvm.sh
Created October 23, 2015 17:32
HHVM KeepAlive - Run this script with a minutely cron job to keep HHVM alive. This script is suited for use with debian, or debian flavored distros. Today, when HHVM crashes or segfaults, the process dies, causing your site to go down for an unprecedented amount of time - until you reboot (if HHVM starts on boot) or restart it manually. Use this…
#!/bin/bash
## Install the cron job below by running crontab -e to make the script run every minute ##
## */1 * * * * bash /change/to/file/path/hhvm.sh ##
#
if ps aux | grep -q "[h]hvm"; then
/etc/init.d/hhvm start
else
:
fi
@8kigai
8kigai / nginx.conf
Created September 30, 2022 08:02 — forked from unixcharles/nginx.conf
nginx config for http/https proxy to localhost:3000
#user nobody;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;