Skip to content

Instantly share code, notes, and snippets.

View wbond's full-sized avatar

Will Bond wbond

View GitHub Profile
import logging
import http.client as http_client
http_client.HTTPConnection.debuglevel = 1
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
requests_log = logging.getLogger("requests.packages.urllib3")
requests_log.setLevel(logging.DEBUG)
requests_log.propagate = True
function repr(data, level)
if not level then
level = 1
end
local data_type = type(data)
if data_type == 'table' then
if level == nil then
level = 1
@wbond
wbond / gist:d83e8e41f5ae2d51cc11
Created June 17, 2014 21:27
decrypt an encrypted procedure
CREATE PROCEDURE dbo.sp__procedure$decrypt
(@procedure sysname = NULL, @revfl int = 1)
AS
SET NOCOUNT ON
IF @revfl = 1
BEGIN
PRINT 'CAUTION: THIS PROCEDURE DELETES AND REBUILDS THE ORIGINAL STORED
PROCEDURE.'
PRINT ' MAKE A BACKUP OF YOUR DATABASE BEFORE RUNNING THIS PROCEDURE.'
[global]
connect timeout = 2

Keybase proof

I hereby claim:

  • I am wbond on github.
  • I am wbond (https://keybase.io/wbond) on keybase.
  • I have a public key whose fingerprint is 47D0 CD56 BA71 7820 6AC7 3CDB C508 396D 0B85 524E

To claim this, I am signing this object:

@wbond
wbond / 10-monitor.conf
Created November 13, 2013 04:56
Set the GDM resolution when using VMWare. This file should be saved as /etc/X11/xorg.conf.d/10-monitor.conf.
Section "Monitor"
Identifier "Monitor0"
HorizSync 1.0 - 10000.0
VertRefresh 1.0 - 10000.0
EndSection
Section "Device"
Identifier "Device0"
Driver "vmware"
EndSection
@wbond
wbond / export.sh
Created July 27, 2013 15:57
Extract CA certs on OS X
security export -k /System/Library/Keychains/SystemRootCertificates.keychain -t certs -p > ~/allcerts.pem
@wbond
wbond / compile.sh
Last active September 21, 2022 22:39
Subversion windows compile
# Install mingw with msys and all options from http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
# Install python 2.7 to C:\Python27 and add to Path environmental variable
cd ~/src
cd openssl
./Configure mingw shared --prefix=/usr/local
make depend
make
make install
@wbond
wbond / Gruntfile.js
Created April 8, 2013 15:19
My gruntfile that is resulting in really slow SCSS compiles
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
glob_to_multiple: {
expand: true,
cwd: 'javascripts',
src: ['*.coffee'],
dest: 'javascripts/',
ext: '.js'
@wbond
wbond / install_uwsgi.sh
Created March 11, 2013 03:02
Install uwsgi via pip on Ubuntu 12.04 with custom Python 3.3 install. For some reason this requires special LDFLAGS. Error messages included: `posixmodule.c:5932: undefined reference to 'openpty'` `posixmodule.c:5992: undefined reference to 'forkpty'`
LDFLAGS="-Xlinker --no-as-needed" pip install uwsgi