Skip to content

Instantly share code, notes, and snippets.

Drew Wells drewwells

Block or report user

Report or block drewwells

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@drewwells
drewwells / mingwget.sh
Last active Oct 1, 2019
Cross compile windows on OS X with mingw
View mingwget.sh
#!/bin/sh
# check_error my_cmd --param ...
check_error() {
$* # we execute everything
if [ $? -ne 0 ]; then
echo "check_error(): erreur avec la commande suivante:"
echo "check_error(): $*"
echo "check_error(): Continuer? o/n"
read a
@drewwells
drewwells / gist:4219907
Created Dec 5, 2012
Webkit+Moz detect device pixel ratio
View gist:4219907
var ratio = window.devicePixelRatio ||
(function(i){
var wmq = window.matchMedia;
while( !window.devicePixelRatio && i > 0 &&
!wmq("(min--moz-device-pixel-ratio:" + i/10 + ")").matches ){
i=i-1;
}
return i/10;
})(30);
@drewwells
drewwells / core.test.js
Created Apr 14, 2011
RequireJS and QUnit sitting in a tree
View core.test.js
//Wait for relevant code bits to load before starting any tests
define(['core.js'], function( core ) {
module("Core Tests");
test("Test core methods", function(){
expect(2);
equals( 1, 1, "A trivial test");
ok( true, "Another trivial test");
});
@drewwells
drewwells / hijackhttps.go
Last active Sep 9, 2018 — forked from Soulou/hijackhttps.go
I was looking to do HTTPS socket hijacking, here is the way to do ! The link between client and server are completely encrpted.Keywords : HTTPS TCP Socket Hijacking Golang
View hijackhttps.go
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
@drewwells
drewwells / Custom.css
Created Oct 26, 2011 — forked from anonymous/gist:1258555
Solarized Dark Theme (with sidebar and view-source colors) for Google Chrome Dev Tools
View Custom.css
/**********************************************/
/*
/* Solarized Dark Skin by Mark Osborne - 2011
/*
/* Based on IR_Black Skin by Ben Truyman:
/* https://gist.github.com/1245727
/*
/* and Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
@drewwells
drewwells / mtime_file_watcher.py
Created Sep 30, 2015
do not watch the entire gopath
View mtime_file_watcher.py
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@drewwells
drewwells / org.golang.doc.example.plist
Created Mar 26, 2015
Local godoc server for private packages. You will need to build the search index (periodically) to use search functionality.
View org.golang.doc.example.plist
?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>GOPATH</key>
<string>{YOUR GOPATH}</string>
<key>GOROOT</key>
@drewwells
drewwells / left.yaml
Created Aug 8, 2017
what's the difference
View left.yaml
apiVersion: v1
data:
bmc.env: |-
REGION=us-phoenix-1
TENANCY_OCID=ocid1.tenancy.oc1..aaaa
USER_OCID=ocid.user.oc1..aaaa
kind: ConfigMap
View delay.js
define([
"../core",
"../queue",
"../effects" // Delay is optional because of this dependency
], function( jQuery ) {
// Based off of the plugin by Clint Helfers, with permission.
// http://blindsignals.com/index.php/2009/07/jquery-delay/
jQuery.fn.delay = function( time, type ) {
time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
View trace.log
[main] [ 2016-03-18 13:40:47.170 UTC ] [Host.<init>:1090] Begin tracing..
[main] [ 2016-03-18 13:40:47.224 UTC ] [OsUtilsBase.getBaseFromOrabase:659] oraBaseUtility /u01/app/oracle/product/12.1.0/xe/bin/orabase
[main] [ 2016-03-18 13:40:47.224 UTC ] [OsUtilsBase.getBaseFromOrabase:668] cmds: /u01/app/oracle/product/12.1.0/xe/bin/orabase
[main] [ 2016-03-18 13:40:47.225 UTC ] [OsUtilsBase.getBaseFromOrabase:672] envs: ORACLE_HOME=/u01/app/oracle/product/12.1.0/xe
[main] [ 2016-03-18 13:40:47.242 UTC ] [OsUtilsBase.getBaseFromOrabase:682] baseLocation from orabase
/u01/app/oracle
[main] [ 2016-03-18 13:40:47.242 UTC ] [OsUtilsBase.getBaseFromOrabase:707] orabaseLocation= /u01/app/oracle
[main] [ 2016-03-18 13:40:47.243 UTC ] [SilentHost.initialize:187] SilentHost-> initialize: m_tempLogFile = /u01/app/oracle/cfgtoollogs/dbca/silent.log_2016-03-18_01-40-47-PM
[main] [ 2016-03-18 13:40:47.248 UTC ] [Host.checkIfBigClusterAndHubNode:1710] Not a cluster environment: exiting BigCluster Check
[main] [ 2016-
You can’t perform that action at this time.