Skip to content

Instantly share code, notes, and snippets.

View edcottrell's full-sized avatar

Ed Cottrell edcottrell

View GitHub Profile
@edcottrell
edcottrell / randomSortSOAnswers.user.js
Last active November 20, 2015 21:48
Stack Overflow Random Answer Sort Tab
// ==UserScript==
// @name Stack Overflow Random Answer Sort Tab
// @namespace https://github.com/edcottrell/
// @version 0.1.2
// @description Add a "random" tab for sorting Stack Overflow answers
// @author Ed Cottrell
// @license MIT
// @match *://*.askubuntu.com/*
// @match *://*.mathoverflow.net/*
// @match *://*.serverfault.com/*
@edcottrell
edcottrell / gist:590a7b5808dd6040f98b
Created April 26, 2015 19:52
Working SSL Config for MySQL
+---------------+---------------------------------------+
| Variable_name | Value |
+---------------+---------------------------------------+
| have_openssl | YES |
| have_ssl | YES |
| ssl_ca | /home/mysql/certs/ca-cert.pem |
| ssl_capath | |
| ssl_cert | /home/mysql/certs/server-cert.pem |
| ssl_cipher | DHE-RSA-AES256-SHA |
| ssl_key | /home/mysql/certs/server-key.pem |
[mysqld]
ssl
ssl-cipher=DHE-RSA-AES256-SHA
ssl-ca="/home/mysql/certs/ca-cert.pem"
ssl-cert="/home/mysql/certs/server-cert.pem"
ssl-ca="/home/mysql/certs/server-key.pem"
[client]
ssl-ca="/home/mysql/certs/ca-cert.pem"
ssl-cert="/home/mysql/certs/client-cert.pem"
@edcottrell
edcottrell / gist:20bb759c0a5efff8797a
Last active August 29, 2015 14:19
MySQL SSL Variables Output
+---------------+----------------------------+
| Variable_name | Value |
+---------------+----------------------------+
| have_openssl | DISABLED |
| have_ssl | DISABLED |
| ssl_ca | |
| ssl_capath | |
| ssl_cert | |
| ssl_cipher | |
| ssl_key | |
@edcottrell
edcottrell / gist:854056066f8196d925bf
Created April 26, 2015 19:30
Check MySQL SSL Variables
mysql> SHOW VARIABLES LIKE '%ssl%';
@edcottrell
edcottrell / Test real PHP timeout
Created July 10, 2014 17:53
Test real PHP timeout
<?php
$start = microtime();
while(microtime() - $start < 60000) {
echo (microtime() - $start)/1000 . " seconds elapsed<br/>";
sleep(500);
}
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Ed Cottrell's AutoHotKey script for toggling the "Find Results" pane/window in Notepad++
; Released under the MIT License (http://opensource.org/licenses/MIT)
; Version: 1.1
; Release Date: January 15, 2014
; Released on Superuser.com: http://superuser.com/questions/700357/create-a-hotkey-keyboard-shortcut-to-close-the-notepad-find-results-window
; Also released at www.edcottrell.com/2014/01/11/toggle-find-results-window-notepad-hotkey/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Turn F7 into a toggle for the Notepad++ search results window; currently it shows it, but doesn't hide it.
javascript:
/**
* TAMES Case Number Search Bookmarklet
* (c) 2014 Ed Cottrell
*
* Licensed under the MIT License
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights