Skip to content

Instantly share code, notes, and snippets.

View allquixotic's full-sized avatar
🎯
Focusing

Sean McNamara allquixotic

🎯
Focusing
View GitHub Profile
#!/usr/bin/env python
import sys
from datetime import datetime
import subprocess
DB_LOGIN = 'root'
DB_PASSWD = 'XXXX'
VAULT_NAME = 'backup_sunny'
HOSTNAME = 'Sunny'
@allquixotic
allquixotic / p_setSkill.sql
Last active August 29, 2015 14:15
p_setSkill procedure for Life Is Feudal admins
-- Author: Sean McNamara <smcnam@gmail.com>
-- Last Updated: 02/21/2015
-- For: Life Is Feudal: Your Own on MySQL/MariaDB (tested with MariaDB 10.1.x)
-- License: Apache License 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt
-- Parameter documentation:
-- cname: The first name of the character whose skill you want to change.
-- sname: The case-sensitive skill name of the skill you want to change.
-- amt: The whole number (decimals are not supported) of the skill to set.
-- stus: 1 if you want to unlock the skill, or 0 if you want to lock it.
DELIMITER //
@allquixotic
allquixotic / charlimit.sql
Created February 26, 2015 01:12
LiF:YO Per-Account Character Limits
CREATE TABLE IF NOT EXISTS `character_limits`
(
AccountID INT PRIMARY KEY,
CharacterLimit INT
);
DROP FUNCTION IF EXISTS `f_getCharacterLimit`;
DROP PROCEDURE IF EXISTS `p_setCharacterLimit`;
DROP PROCEDURE IF EXISTS `p_incrementCharacterLimitById`;
DROP PROCEDURE IF EXISTS `p_incrementCharacterLimitByName`;
(function ($) {
// Creates an iframe with an embedded HipChat conversation window.
//
// Options:
// url - The url to the room to embed; required
// container - The container in which to insert the HipChat panel; required
// timezone - The timezone to use in the embedded room; required
// welcome - A welcome message to display when the room is joined; optional
// noframes - Content to include when iframes are disabled in the browser; optional
#!/usr/bin/env ruby
def log(x)
`touch arkupdate.log`
open("arkupdate.log", "a") { |f| f.puts "[#{Time.now.inspect}]: #{x}\n" }
end
def monitorUpdate()
while true
a = `rcons listplayers`.strip == "No Players Connected"
@allquixotic
allquixotic / autohotkey.ahk
Created July 26, 2015 18:52
AHK for farming herbs in Life Is Feudal
;LiF Gathering AFK Script
;Author: Sean McNamara <smcnam@gmail.com>
;VERSION 1.1
toggle = 0
togglex = 0
;SendMode InputThenPlay
SendMode Event
#MaxThreadsPerHotkey 2
;GLOBAL VARIABLES
@allquixotic
allquixotic / removesparkles.js
Created August 25, 2015 00:10
Remove Sparkles from an Enjin website
// ==UserScript==
// @name Remove Sparklies
// @namespace http://www.pf-enclave.org
// @version 0.1
// @description It does something useful
// @author Sean McNamara
// @match http://www.pf-enclave.org/*
// @grant none
// ==/UserScript==
@allquixotic
allquixotic / removesparkles.js
Created August 25, 2015 16:52
Remove sparkles (better version)
// ==UserScript==
// @name Remove Sparklies
// @namespace http://www.pf-enclave.org
// @version 0.2
// @description It does something useful
// @author Sean McNamara / Bob Rao
// @match http://www.pf-enclave.org/*
// @grant none
// ==/UserScript==
@allquixotic
allquixotic / gist:a89613d7ad06d712c3be
Created September 7, 2015 20:56
script to install zfs on ubuntu live 15.04
echo 'deb http://ppa.launchpad.net/zfs-native/stable/ubuntu vivid main ' >> /etc/apt/sources.list
apt-get update
apt-get install -y build-essential
#apt-get install -y aptitude openssh-server
apt-get install -y --force-yes ubuntu-zfs zfs-dkms zfsutils efibootmgr
(function(){function h(a){return function(){return this[a]}}function l(a){return function(){return a}}var m=this;
function ba(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return"string"==typeof a}function ca(a,b,c){return a.call.apply(a.bind,arguments)}function da(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,