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 / gw_pretty.ini
Last active April 6, 2022 17:37
Guild Wars Classic Reshade preset
PreprocessorDefinitions=
Techniques=UIDetect@UIDetect.fx,ContrastAdaptiveSharpen@CAS.fx,UIDetect_Before@UIDetect.fx,Monocular_Cues@Depth_Cues.fx,Blooming_HDR@BloomingHDR.fx,UIDetect_After@UIDetect.fx
TechniqueSorting=UIDetect@UIDetect.fx,ContrastAdaptiveSharpen@CAS.fx,UIDetect_Before@UIDetect.fx,Monocular_Cues@Depth_Cues.fx,Blooming_HDR@BloomingHDR.fx,UIDetect_After@UIDetect.fx
[BloomingHDR.fx]
Adapt_Adjust=0.500000
Adapt_Seek=0.500000
Auto_Bloom=0
Auto_Exposure=1
BloomCurve=2.000000
@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
@haliphax
haliphax / ShibbolethIISAuthModule.cs
Created November 17, 2020 00:58
Shibboleth IIS Authentication Module
/***
* Shibboleth IIS Authentication Module
*
* This module is responsible for taking two attributes from Shibboleth
* (uid, memberOf) and using them to construct a user principal that
* can be used in IIS authorization rules. Add the generated DLL to
* either the GAC or the web site's Bin folder and reference it in the
* Modules configuration for IIS.
***/
@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-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-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-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-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 / 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 / flatten.py
Last active February 28, 2024 18:26
Flatten irregular array
def flatten(source):
"""
Flattens an irregular array into a single dimension.
:param list source: The array to flatten
:rtype: list
:returns: The flattened array
"""
assert isinstance(source, (list, tuple)), 'Only lists and tuples are supported'