Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View matijs's full-sized avatar
:dependabot:
Scouting turtles

matijs matijs

:dependabot:
Scouting turtles
View GitHub Profile
@matijs
matijs / slow_server.py
Created February 25, 2015 13:28
Enhanced Python SimpleHTTPServer to slowly serve a specific mimetypes
"""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 August 8, 2023 08:39
nginx TLS / SSL configuration options for konklone.com
# 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 July 31, 2013 08:45
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
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 December 3, 2018 10:59
How to quickly create a "Convert to data URI" context menu option on Mac

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 April 6, 2018 09:26
Transparent CSS preprocessing
/**
* 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 June 3, 2012 19:30
addEventListener polyfill for IE6+
//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}
// 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';