Skip to content

Instantly share code, notes, and snippets.

@D1SoveR
D1SoveR / dotnet35.reg
Created April 10, 2020 22:46
Registry file to prevent Killing Floor 2 from reinstalling .NET 3.5 on every launch in SteamPlay
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Wow6432Node\Valve\Steam\Apps\CommonRedist\.NET\3.5]
"3.5 SP1"=dword:00000001
@D1SoveR
D1SoveR / ios_bind_fix.js
Created April 11, 2012 21:14
Shim for missing bind() on iOS browsers
if (!Function.prototype.bind) {
Function.prototype.bind = function(context) {
var original_function = this;
var curry_arguments = Array.prototype.slice.call(arguments, 1);
return function() {
var total_arguments = curry_arguments.concat(Array.prototype.slice.call(arguments, 0));
return original_function.apply(context, total_arguments);
};
};
}
@D1SoveR
D1SoveR / gist:1216421
Created September 14, 2011 12:20
Inline Backgrounds
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">
</head>
<body>
<div class="big ribbon">
@D1SoveR
D1SoveR / facebook-https.js
Created December 13, 2010 00:13
Greasemonkey Script for Facebook HTTPS
// ==UserScript==
// @name Facebook HTTPS-ifier
// @namespace Facebook
// @description Converts all links pointing to Facebook to use HTTPS.
// @author Mikolaj "D1SoveR" Banasik
// @include http://*facebook.com/*
// @include https://*facebook.com/*
// @match http://*facebook.com/*
// @match https://*facebook.com/*
// ==/UserScript==
import struct
import socket
import hashlib
import sys
from select import select
import re
import logging
class WebSocket(object):
handshake = (
@D1SoveR
D1SoveR / ActiveX ODBC Wrapper.py
Created February 19, 2010 14:42
Wrapper for pywin32's ActiveX ODBC handler
# -*- coding: UTF-8 -*--
# *** ADO Connection ***
# -----------------------------------------------
"""
Code wrapping pywin32's code for ADO.Connection ActiveX object.
Used to make this god-awful excuse for ODBC support at least
partially bearable. At least until PyODBC or SQLAlchemy gets
its Python 3 port.