Skip to content

Instantly share code, notes, and snippets.

View kg's full-sized avatar

Katelyn Gadd kg

View GitHub Profile
div.lis-ability.on {
-webkit-transform: none !important;
transform: none !important;
}
div.lis-ability.btn-ability-unavailable.on::after {
display: none !important;
}
div.lis-ability::after {
.custom instance void A::.ctor() = (
PROLOG // ctor arguments
// no items
PROLOG // field values
FIELD //
51 01 58 // inline str 'X'. What is 51?
55 62 // length of type name???
43 60 31 2B 45 5B 5B // C`1+E[[
** // rest of type name, omitted
5D 5D // ]]
@if [%6]==[] goto error
@goto ok
:error
@echo USAGE: video2gif START_TIME DURATION WIDTH FRAME_RATE (DITHER_OPTIONS) (CROP_RECTANGLE width:height:x:y) (EQ_OPTIONS) INPUT OUTPUT
@goto end
:ok
@set PALETTE="%TEMP%\palette.png"
@kg
kg / 60848.cs
Created January 10, 2018 03:46
using System;
public static class Program
{
public const string UnicodeLowSurrogate = "l\uDC00";
public const string UnicodeHighSurrogate = "h\uD800";
public const string UnicodeReplacementCharacter = "\uFFFD";
public static void Main()
{
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading;
public static class Program {
public static void Main () {
while (true) {
Step();
// Even though we're closing our listener and sockets, without this we run out of files in Mono on Linux
@kg
kg / sle.cs
Created September 14, 2017 01:01
private void GenerateLayout () {
if (Fragments.Count == 0) {
Layout = null;
return;
}
var rng = new MersenneTwister(RNGSeed);
var sle = new StringLayoutEngine {
characterWrap = true,
wordWrap = true,
Making all in runtime
make[2]: Entering directory '/home/kate/Projects/mono/runtime'
if test -w /home/kate/Projects/mono/mcs; then :; else chmod -R +w /home/kate/Projects/mono/mcs; fi
cd /home/kate/Projects/mono/mcs && make --no-print-directory -s NO_DIR_CHECK=1 PROFILES='binary_reference_assemblies net_4_x xbuild_12 xbuild_14 ' CC='gcc' all-profiles
make[6]: mono: Command not found
build/profiles/basic.make:113: recipe for target 'build/deps/basic-profile-check.exe' failed
make[6]: *** [build/deps/basic-profile-check.exe] Error 127
*** The runtime 'mono' doesn't appear to be usable.
*** Trying the 'monolite-linux/1050700000' directory.
@kg
kg / ws.cs
Created August 21, 2017 02:30
public async Task MainLoop () {
var readBuffer = new ArraySegment<byte>(new byte[102400]);
WebSocketReceiveResult wsrr;
if (!await Start()) {
WebSocket.Dispose();
return;
}
@kg
kg / dpi.cs
Created August 12, 2017 03:25
unsafe static Program () {
var dpiSetOk = false;
try {
var hr = Win32.SetProcessDpiAwareness(Win32.ProcessDpiAwareness.PROCESS_PER_MONITOR_DPI_AWARE);
if (hr != 0)
Console.WriteLine("SetProcessDpiAwareness={0}, LastError={1}", hr, Marshal.GetLastWin32Error());
else
dpiSetOk = true;
} catch {
Updating goal targets....
/home/kate/Projects/mono/mcs/class/System/../../build/rules.make:205 File `install-local' does not exist.
/home/kate/Projects/mono/mcs/class/System/../../build/rules.make:205 File `all-local' does not exist.
Prerequisite `../../class/lib/net_4_x-linux/System.Xml.dll' is newer than target `../../class/lib/net_4_x-linux/System.dll'.
Prerequisite `../../class/lib/net_4_x-linux/System.Configuration.dll' is newer than target `../../class/lib/net_4_x-linux/System.dll'.
/home/kate/Projects/mono/mcs/class/System/../../build/deps/linux_net_4_x__System.dll.makefrag:1 Must remake target `../../class/lib/net_4_x-linux/System.dll'.
Invoking recipe from ../../build/library.make:311 to update target `../../class/lib/net_4_x-linux/System.dll'.
##>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
echo "CSC [net_4_x-linux] System.dll"; MONO_PATH="./../../class/lib/build:$MONO_PATH" CSC_SDK_PATH_DISABLED= /home/kate/Projects/mono/runtime/mono-wrapper --aot-path=/home/