Skip to content

Instantly share code, notes, and snippets.

:octocat:
Turtle hunting

Matijs Brinkhuis matijs

Block or report user

Report or block matijs

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
@matijs
matijs / slow_server.py
Created Feb 25, 2015
Enhanced Python SimpleHTTPServer to slowly serve a specific mimetypes
View slow_server.py
"""Simple HTTP Server.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
__version__ = "0.6"
@konklone
konklone / ssl.rules
Last active Apr 24, 2019
nginx TLS / SSL configuration options for konklone.com
View ssl.rules
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@dctrwatson
dctrwatson / OpenSSL 0.9.8x
Created Jul 31, 2013
Difference between OpenSSL versions System Version: OS X 10.8.4 (12E55) Kernel Version: Darwin 12.4.0 Model Name: MacBook Pro Model Identifier: MacBookPro10,2 Processor Name: Intel Core i7 Processor Speed: 2.9 GHz Number of Processors: 1 Total Number of Cores: 2 L2 Cache (per Core): 256 KB L3 Cache: 4 MB Memory: 8 GB
View OpenSSL 0.9.8x
OpenSSL 0.9.8x 10 May 2012
built on: Apr 27 2013
options:bn(64,64) md2(int) rc4(ptr,char) des(idx,cisc,16,int) aes(partial) blowfish(ptr2)
compiler: -arch x86_64 -fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -O3 -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DMD32_REG_T=int -DOPENSSL_NO_IDEA -DOPENSSL_PIC -DOPENSSL_THREADS -DZLIB -mmacosx-version-min=10.6
available timing options: TIMEB USE_TOD HZ=100 [sysconf value]
timing function used: getrusage
The 'numbers' are in 1000s of bytes per second processed.
type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes
md5 38143.69k 119545.89k 277327.98k 421224.64k 490718.66k
hmac(md5) 44242.06k 134438.19k 293790.30k 422019.19k 494423.98k
@andreasbovens
andreasbovens / data-uri-context-menu-mac.md
Last active Dec 3, 2018
How to quickly create a "Convert to data URI" context menu option on Mac
View data-uri-context-menu-mac.md

Setup

  1. Download https://gist.github.com/jsocol/1089733 and unpack
  2. Rename data-uri.py to data-uri and copy to /usr/local/bin/
  3. Open Terminal, cd /usr/local/bin/ and and then chmod +x data-uri (enter password when prompted)
  4. Open Automator, choose New > Service.
  5. Set up the service as follows:
    Service receives selected files or folders in Finder.app
    which is connected to a Run Shell Script action, with the following settings:
@necolas
necolas / input.css
Last active Apr 6, 2018
Transparent CSS preprocessing
View input.css
/**
* Input CSS
* No custom syntax. Just write "future" CSS without vendor prefixed properties or values.
* Use a subset of CSS variables (not dynamic or scoped).
* Specify a level of browser support: IE 8+, etc.
* Tool takes browser support and specific declarations to generate vendor-specific variants.
* This source code is just CSS and works in any browser with adequate support.
* One day, perhaps you'll have no need to preprocess this code.
*/
@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created Jun 3, 2012
addEventListener polyfill for IE6+
View addEventListener-polyfill.js
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
View exportjson.js
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
You can’t perform that action at this time.