Skip to content

Instantly share code, notes, and snippets.

@lydonchandra
lydonchandra / HideJobs.user.js
Last active May 29, 2019 03:04 — forked from Tiny-Giant/HideJobs.user.js
Hides references to Stack Overflow Jobs
// ==UserScript==
// @name Hide Jobs
// @namespace http://github.com/Tiny-Giant
// @version 1.0.0.1
// @description Hides references to Stack Overflow Jobs
// @author @TinyGiant
// @include /https?:\/\/(meta\.)?stackoverflow\.com/.*/
// @grant none
// ==/UserScript==
/* jshint -W097 */
@lydonchandra
lydonchandra / KillThread.cs
Created November 26, 2015 02:59 — forked from fresky/KillThread.cs
Kill thread in C#
class Program
{
static int threadID=0;
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
static extern IntPtr OpenThread(uint dwDesiredAccess, bool bInheritHandle, uint dwThreadId);
[System.Runtime.InteropServices.DllImport("kernel32.dll")]
static extern bool TerminateThread(IntPtr hThread, uint dwExitCode);
@lydonchandra
lydonchandra / LocalDB Reset
Last active February 5, 2022 20:02 — forked from hanssens/LocalDB Reset
Reset SQL's LocalDB, after corrupt rights or other problems.
# After problems with a company-wide ActiveDirectory shaker, all (local) SQL Server instances were FUBAR.
# This 'resets' the LocalDB sql instance.
sqllocaldb stop MSSQLLocalDB -k
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
@lydonchandra
lydonchandra / Postgres build on Windows Server 2012 using MinGW
Created October 6, 2015 07:01 — forked from gurjeet/Postgres build on Windows Server 2012 using MinGW
Documents the steps of building PostgreSQL on Windows Server 2012 64bit using MinGW (32bit builds as well as 64bit builds)
Beware:
=======
If you wish to compile Postgres with XML support, tough luck! The libxml2 package that comes with MinGW/MSYS, named msys-libxml2, is rejected by gcc like this:
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.7.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/MinGW/msys/1.0/lib/libxml2.a when searching for -lxml2
This is a known limitation as of now. Andrew Dunstan, the community buildfarm maintainer, as acknowledged this.
Make the environment bearable:
#!/bin/sh -ex
DEVELOPER=`xcode-select --print-path`
PLATFORM="iPhoneOS"
ARCH="armv7"
IPHONE_SDK="7.0"
IPHONE_MIN_VERSION="5.0"
VERSION="1.3.0"
NASM_VERSION="2.10.09"