Skip to content

Instantly share code, notes, and snippets.

View SpenserJ's full-sized avatar

Spenser Jones SpenserJ

View GitHub Profile

Keybase proof

I hereby claim:

  • I am SpenserJ on github.
  • I am spenserj (https://keybase.io/spenserj) on keybase.
  • I have a public key whose fingerprint is 0DEE BB00 ABBE E64C 60A4 00BF 4D82 B2D5 477D 8D46

To claim this, I am signing this object:

INFO ::2014-07-09 09:58:27::utils.py:72::TNArchipelHypervisor.create_hook (svr-vhost1@vhost-xmpp/svr-vhost1)::HOOK: creating hook with name HOOK_ARCHIPELENTITY_XMPP_CONNECTED
INFO ::2014-07-09 09:58:27::utils.py:72::TNArchipelHypervisor.create_hook (svr-vhost1@vhost-xmpp/svr-vhost1)::HOOK: creating hook with name HOOK_ARCHIPELENTITY_XMPP_DISCONNECTED
INFO ::2014-07-09 09:58:27::utils.py:72::TNArchipelHypervisor.create_hook (svr-vhost1@vhost-xmpp/svr-vhost1)::HOOK: creating hook with name HOOK_ARCHIPELENTITY_XMPP_AUTHENTICATED
INFO ::2014-07-09 09:58:27::utils.py:72::TNArchipelHypervisor.create_hook (svr-vhost1@vhost-xmpp/svr-vhost1)::HOOK: creating hook with name HOOK_ARCHIPELENTITY_PLUGIN_ALL_LOADED
INFO ::2014-07-09 09:58:27::utils.py:72::TNArchipelHypervisor.create_hook (svr-vhost1@vhost-xmpp/svr-vhost1)::HOOK: creating hook with name HOOK_ARCHIPELENTITY_VCARD_READY
INFO ::2014-07-09 09:58:2
@SpenserJ
SpenserJ / marksteele-attackScript.js
Last active December 23, 2015 07:48
Topia Online - marksteele - Attack Script
//global variables
var potion = [0,0]; //potions
var player; //character array - We'll set this later
var entities = _.map(player, function(c){return Topia.getEntities(c)}; //array of entities for each character
var counter =[0,0]; //counter to replace for looping
// Check how many characters we have right away, and create them if they're missing
if (Topia.characters.length < 1) //creates character 1
{
Topia.action("CreateCharacter", { obeliskId: 1 });
@SpenserJ
SpenserJ / TurnItInMoodle-MSSQLSupport.patch
Created August 30, 2013 16:58
Starter-patch for TurnItIn Moodle Integration This fixes the bare minimum for MSSQL support. There are significantly more SQL Queries that need to be checked.
diff -Naur original/turnitintool/lib.php fixed/turnitintool/lib.php
--- original/turnitintool/lib.php 2013-08-30 09:26:23.421505801 -0600
+++ fixed/turnitintool/lib.php 2013-08-30 10:52:56.173505801 -0600
@@ -289,7 +289,7 @@
*/
function turnitintool_update_instance($turnitintool) {
- global $USER,$CFG;
+ global $USER,$CFG,$DB;
@SpenserJ
SpenserJ / CleverAPI_AverageStudentsPerSection.js
Created June 23, 2013 01:25
Access the Clever API and calculate the average number of students in a section.
var https = require('https')
, _ = require('lodash');
var getSections = function getSections(page) {
https.get(
{
host: 'api.getclever.com',
// Uncomment this for an example of paging
// path: '/v1.1/sections?limit=10&page=' + (page || 1),
path: '/v1.1/sections?page=' + (page || 1),
<html><head></head><body> <script>window.parent['slat_progress'](0.02);</script> <script type='text/javascript'> window.parent['slat_process']({"playlistId":"all","requestTime":1371876305930000,"differentialUpdate":false,"playlist":[{"genre":"Rock","beatsPerMinute":0,"albumArtistNorm":"","artistNorm":"12 stones","album":"Anthem for the Underdog","lastPlayed":1369837737172103,"artistImageBaseUrl":"//lh5.googleusercontent.com/p6Y0psxJXgsh9q1i3gm8ZdzVt5xMi88VIc9ZN90-qrCQLV2IWERWz8yl9lZAYOfgXJ8MihD0ig","type":6,"recentTimestamp":1369837737171000,"disc":0,"id":"b1720aa0-8338-3e3a-a0c2-6e592f396e29","composer":"","title":"Broken Road","albumArtist":"","artistMatchedId":"Akwbphhnp44mrdrxdkplduhff4a","totalTracks":0,"subjectToCuration":false,"name":"Broken Road","totalDiscs":0,"year":0,"titleNorm":"broken road","artist":"12 Stones","albumNorm":"anthem for the underdog","track":3,"origin":[],"durationMillis":240664,"matchedId":"Tg7uhlhcby3oh3gt7g5bkm72dca","albumArtUrl":"//lh5.googleusercontent.com/MmSfVM8FZe6cAHzf4BR
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/gists/5001775/download | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the download button.
pushd $HOME
aptget='sudo apt-get'
chsh='sudo chsh'
server {
listen 80 default;
#listen 443 ssl;
server_name domain.com;
#ssl_certificate /usr/local/nginx/certs/domain.com.pem;
#ssl_certificate_key /usr/local/nginx/certs/domain.com.key;
access_log /var/log/nginx/domain.com/access.log;
error_log /var/log/nginx/domain.com/error.log;
user www;
worker_processes 4;
events {
worker_connections 8192;
use epoll;
}
pid /var/run/nginx.pid;
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (@prefix@). This prefix can be dynamicaly changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the