Skip to content

Instantly share code, notes, and snippets.

View haliphax's full-sized avatar
💭
git clone self

haliphax

💭
git clone self
View GitHub Profile
@haliphax
haliphax / WhenNewItemTemplateIsDerivedFrom.cs
Created June 10, 2019 17:15
Sitecore bucket condition for determining if a new item is made or derived from a specific template
using Sitecore.Buckets.Rules.Bucketing;
using Sitecore.Data;
using Sitecore.Data.Managers;
using Sitecore.Data.Templates;
using Sitecore.Rules.Conditions;
namespace Custom.Sitecore.Feature.Blog.BucketConditions
{
public class WhenNewItemTemplateIsDerivedFrom<T> : WhenCondition<T> where T : BucketingRuleContext
{
@haliphax
haliphax / chud.user.js
Last active January 31, 2020 17:57
CHUD: Caddy Healer for Urban Dead (userscript)
// ==UserScript==
// @name CHUD
// @namespace https://roadha.us
// @author haliphax (https://roadha.us)
// @contributor jimflexx (http://userscripts.org/users/117383)
// @description Caddy Healer for Urban Dead
// @include http://urbandead.com/map.cgi*
// @include http://www.urbandead.com/map.cgi*
// ==/UserScript==
@haliphax
haliphax / udinventory.user.js
Last active March 30, 2020 15:33
UD Inventory (userscript)
// ==UserScript==
// @author haliphax
// @include http://*urbandead.com/map.cgi*
// @exclude http://*urbandead.com/map.cgi?log*
// @name UDInventory
// @namespace https://roadha.us
// @description (Urban Dead) Groups items together in your inventory and squashes mall search
// @version 1.1
// ==/UserScript==
@haliphax
haliphax / udpe.user.js
Last active April 1, 2020 14:47
Urban Dead Profile Expander (userscript)
// ==UserScript==
// @match http://urbandead.com/map.cgi*
// @match http://www.urbandead.com/map.cgi*
// @include http://*urbandead.com/map.cgi*
// @exclude http://*urbandead.com/map.cgi?log*
// @name UD Profile Expander
// @namespace http://userscripts.org/users/72447
// @description (Urban Dead) Shows users' profile information in-game
// ==/UserScript==
@haliphax
haliphax / nc-speedy-safe-b4.user.js
Last active April 8, 2020 15:44
Nexus Clash Speedy Safe (B4) UserScript
// ==UserScript==
// @name Nexus Clash Speedy Safe (B4)
// @namespace https://roadha.us
// @version 1.0.5
// @description Remembers your selections in the faction safe/footlocker dropdowns
// @author haliphax
// @match https://nexusclash.com/modules.php?name=Game*
// @match https://www.nexusclash.com/modules.php?name=Game*
// @grant GM_getValue
// @grant GM_setValue
@haliphax
haliphax / nc-imp-char-sel-b4.user.js
Last active September 8, 2020 18:10
Nexus Clash Improved Character Select (B4) UserScript
// ==UserScript==
// @name Nexus Clash Improved Character Select (B4)
// @namespace https://roadha.us
// @version 0.2
// @description Adds colored resource bars and highlights characters according to certain conditions
// @author haliphax
// @match https://www.nexusclash.com/modules.php?name=Game*
// ==/UserScript==
(function() {
@haliphax
haliphax / nc-a11y-styles.user.css
Last active September 16, 2020 22:10
Nexus Clash Accessible User Styles
/*
When importing this into Stylus, the name of the User Style is used
for URL matching. As such, use this name for the sylesheet:
www.nexusclash.com/modules.php?name=Game
*/
input, select, textarea {
background-color: #000;
border: 1px solid #000;
@haliphax
haliphax / nc-minimap-b4.user.js
Last active December 16, 2020 21:25
Nexus Clash Mini-Map (B4)
// ==UserScript==
// @name Nexus Clash Mini-Map (B4)
// @namespace https://roadha.us
// @author haliphax
// @version 1.1
// @description Adds a mini-map below the standard map view which can be clicked to toggle a full-sized plane map
// @include https://www.nexusclash.com/modules.php?name=Game*
// ==/UserScript==
(function () {
@haliphax
haliphax / nc-imp-pet-status-b4.user.js
Last active March 9, 2021 18:21
Nexus Clash Improved Pet Status (B4) UserScript
// ==UserScript==
// @name Nexus Clash Improved Pet Status (B4)
// @description Adds color to pet status pane based on remaining AP
// @namespace https://roadha.us
// @author haliphax
// @version 1.5
// @include https://www.nexusclash.com/modules.php?name=Game*
// @include https://nexusclash.com/modules.php?name=Game*
// @grant GM_getValue
// @grant GM.getValue
@haliphax
haliphax / utf8ify.py
Created June 1, 2021 18:01
Convert ASCII artwork to UTF-8 for display in modern terminal emulators
"UTF-8ify textmode ASCII artwork for display in modern terminal emulators."
# codec borrowed from https://github.com/jquast/x84
# stdlib
import codecs
import re
from sys import argv