Skip to content

Instantly share code, notes, and snippets.

View juntalis's full-sized avatar

Charles Grunwald juntalis

View GitHub Profile
cl_actorsafemode
cl_AISystem
cl_bandwidth
cl_bob
cl_camera_noise
cl_camera_noise_freq
cl_camKeepX
cl_camKeepY
cl_camKeepZ
cl_camModify
@juntalis
juntalis / SP.FormDigestInfo.js
Last active July 17, 2019 11:53
Extensions to the JSOM client context classes for accessing their cached SP.FormDigestInfo instances.
// Should probably only be used if you're using JSOM from somewhere without
// a __REQUESTDIGEST value or if you need more than just the digest value.
// To avoid having to make this asynchronous and deal with callbacks, this
// code assumes that you've run executeQueryAsync at least once with form
// digest handling enabled. (Default behavior - I think - but you can
// use get/set_formDigestHandlingEnabled if I'm wrong)
//
// Example:
//
// var ctx = SP.ClientContext.get_current();
Index: lcl/include/customlistview.inc
===================================================================
--- lcl/include/customlistview.inc (revision 57768)
+++ lcl/include/customlistview.inc (working copy)
@@ -1669,7 +1669,7 @@
finally
EndUpdate;
end;
- end else
+ end else if FSelected <> nil then
unit ListViewBug;
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls;
procedure ReproduceSegFault;
implementation
@juntalis
juntalis / Compat_ConfigurableMaps.cs
Created September 9, 2018 14:10
Unofficial configurable maps B19
using System;
using System.Linq;
using Harmony;
using MapReroll.Patches;
using MapReroll.UI;
using RimWorld;
using UnityEngine;
using Verse;
namespace MapReroll.Compat {
@juntalis
juntalis / Compat_ConfigurableMaps.cs
Created September 9, 2018 13:59
Patched for B19
using Harmony;
using MapReroll.Patches;
using MapReroll.UI;
using RimWorld;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using UnityEngine;
@juntalis
juntalis / dup-fd-approach.py
Last active April 3, 2018 05:39
Python 3 only - cba to fuck with compatibility shims.
# encoding: utf-8
import os
import io
import errno
import array
import weakref
import tempfile
import functools
@juntalis
juntalis / vmwared.cmd
Created March 18, 2018 02:17
Windows batch script to start/stop/restart/toggle VMWare Workstation related services.
@echo off
setlocal
goto main
:safeset
rem Set a variable only if it's not already set
if defined %~1 goto :EOF
call set "%~1=%%~2"
goto :EOF
@juntalis
juntalis / spauth.py
Created April 1, 2012 07:46
Claims-based Authentication Example for interacting with Sharepoint Online
import os, requests, re
from htmlentitydefs import name2codepoint
from simplejson import loads, dumps
spauth = None
def unescape(s):
name2codepoint['#39'] = 39
return re.sub('&(%s);' % '|'.join(name2codepoint),
lambda m: unichr(name2codepoint[m.group(1)]), s)
@juntalis
juntalis / force-globals.lua
Last active August 27, 2017 08:22
Bypass redis script sandboxing in order to force a set of variables into the global namespace. Use Case: Having a heavily-used script with a bunch initialization time processing (class building, constants tables, etc) that will always execute the exact same way regardless of the user input from ARGV and KEYS or the state of redis's data. This sc…
local function force_globals(globs)
-- Check for metatable on _G. If no metatable exists,
-- create one.
local _G_mt = getmetatable(_G)
if _G_mt == nil then
return setmetatable(_G, {
__index=globs
})
end