brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
<!DOCTYPE html> | |
<head> | |
<title>Stay Standalone</title> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<script src="stay_standalone.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<ul> | |
<li><a href="http://google.com/">Remote Link (Google)</a></li> |
class Filters[T] { | |
//Some boilerplate-busting aliases | |
type FilterResult = Either[Rejection, T] | |
type FilterFunc = (T) => FilterResult | |
//Handy helpers | |
//Rejection can carry as much info as you wish; | |
// Filter name, value in error, an exception, etc. | |
case class Rejection(input: T, msg: String) |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
/* | |
* Check for PDF support | |
* Based on http://downloads.beninzambia.com/blog/acrobat_detection.js.txt | |
*/ | |
$.support.pdf = (function() { | |
try { | |
// IE | |
if(!$.support.cssFloat) { | |
var control = null; | |
function AjaxItems($container, config) { | |
var defaultOpts = { | |
textNoItems: "Не знайдено", | |
removalActionClass: "actionRemove", | |
removalDialog: function(el) { return confirm('Видалити?') }, | |
showNoItems: function($container, message) { | |
$container.empty().append( $div().text(message) ) | |
}, | |
// If you want item removal to be handled, add an element with class .actionRemove (or another specified in removalActionClass option) | |
itemDom: function(el) { |
if (window.navigator.standalone) { | |
var local = document.domain; | |
$('a').click(function() { | |
var a = $(this).attr('href'); | |
if ( a.match('http://' + local) || a.match('http://www.' + local) ){ | |
event.preventDefault(); | |
document.location.href = a; | |
} | |
}); | |
} |
<?php | |
/** | |
* Class Router is static class which serves for routing purposes and can be used in 2 modes: full-map and on-the-go modes. | |
* | |
* Reads request uri path from $_GET['_REQUEST_URI'] | |
*/ | |
class Router | |
{ |
# The upstream server doesn't need a prefix! no need for wss:// or http:// because nginx will upgrade to http1.1 in the config below | |
upstream yeomanserver { | |
server localhost:3000; | |
} | |
server { | |
listen 443; | |
server_name legionofevil.org; | |
root html; |