Skip to content

Instantly share code, notes, and snippets.

View jamesmontalvo3's full-sized avatar

James Montalvo jamesmontalvo3

View GitHub Profile
@jamesmontalvo3
jamesmontalvo3 / user-unify.php
Created December 11, 2015 15:09
A possibly not-yet-ready script to merge user tables across multiple wikis
<?php
$host = 'hostname';
$user = 'your-username';
$pass = 'your-password';
$primeWiki = 'wiki_meta';
$wikiDBnames = array(
'wiki_a',
"wiki_b",
"wiki_c",
@jamesmontalvo3
jamesmontalvo3 / non-root.txt
Created July 10, 2015 04:33
non-root user Meza1 install.sh output
This file has been truncated, but you can view the full file.
[james@Meza1-2015-07-09 ~]$ cat install.sh
#!/bin/bash
#
# Setup the entire Meza1 platform
if [ "$(whoami)" != "root" ]; then
echo "Try running this script with sudo: \"sudo bash install.sh\""
exit 1
fi
@jamesmontalvo3
jamesmontalvo3 / HTML_format.php
Last active August 29, 2015 14:17
PHP implementation for returning JSON and HTML via JSONP
<?php
// set content type to javascript (else it'll think it's HTML)
header( 'Content-Type: application/javascript; charset=utf-8' );
// allow the requester to specify a callback function
$callback = isset( $_GET['callback'] ) ? $_GET['callback'] : 'callback';
// retrieve the contents of the current event's HTML file
$configHtmlText = file_get_contents( __DIR__ . '/Event1069.html' );