For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
| <?php | |
| /** | |
| * Batch Mockup | |
| * Allows batch inserts | |
| * | |
| * I placed this in my BaseController.php | |
| * | |
| * Revision 0.2 | |
| * | |
| * @usage |
| server { | |
| client_max_body_size 20M; | |
| listen 80; | |
| server_name _; #make sure _ is replaced with your main domain if you plan on hosting multiple sites. | |
| root /home/wordpress/wordpress; #You can also use /home/ubuntu/your_domain | |
| #on server block | |
| ##necessary if using a multi-site plugin | |
| server_name_in_redirect off; | |
| ##necessary if running Nginx behind a reverse-proxy | |
| port_in_redirect off; |
| // | |
| // Track.js - tracking scripts by alex miller | |
| // | |
| // | |
| config = {}; | |
| config.track = true;// set to true in production, false in dev env | |
| config.dump = true;// set to false in production env, true in dev | |
| config.mixpanel = true; // <%= TRACKS_CONFIG['mixpanel'] %>; // set to true in production env, false in dev | |
| config.googleAnaltyics = true; |
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
| function hostReachable() { | |
| // Handle IE and more capable browsers | |
| var xhr = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" ); | |
| var status; | |
| var server = window.location.hostname; | |
| if (window.location.port != '') { | |
| server += ':'+window.location.port; | |
| } |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2
| RewriteEngine on | |
| RewriteCond %{HTTP_REFERER} !^$ | |
| # allowed domains, add as needed | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC] | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?christianheilmann.com [NC] | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?wait-till-i.com [NC] | |
| RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?mozilla.org [NC] | |
| # search engines and social sites and stuff |