This is a quick-ref for various nginx variables.
### Module name
* $variable_name
defination/usage
| // https://gist.github.com/854622 | |
| (function(window,undefined){ | |
| // Prepare our Variables | |
| var | |
| History = window.History, | |
| $ = window.jQuery, | |
| document = window.document; | |
| // Check to see if History.js is enabled for our Browser |
| require 'ipaddr' | |
| IPAddr.new("192.168.0.1").to_i | |
| => 3232235521 | |
| IPAddr.new(3232235521, Socket::AF_INET).to_s | |
| => "192.168.0.1" |
| /* | |
| * Copyright (c) 2013 by Wil Tan <wil@cloudregistry.net> | |
| * | |
| * Based on dump_dns.c from the dnscap <https://www.dns-oarc.net/tools/dnscap> | |
| * originally written by Paul Vixie. | |
| * | |
| * Copyright (c) 2007 by Internet Systems Consortium, Inc. ("ISC") | |
| * | |
| * Permission to use, copy, modify, and/or distribute this software for any | |
| * purpose with or without fee is hereby granted, provided that the above |
IP-LOCATION-ISP
| # A quick and dirty plugin for Jekyll by Eli Naeher | |
| # | |
| # This plugin creates a site.years template variable which allow you to group archive links by year and month. | |
| # The structure of site.years is: | |
| # site.years = 2001=>[[post1, post2...], [...]], 2002=>[...] | |
| # | |
| # Usage should look something like this: | |
| # {% for year in site.years %} | |
| # <h2>Year {{ year.first.first.date | date: "%Y" }}</h2> |
| rewrite_by_lua ' | |
| REDIR_R = { | |
| ["/r/1"] = "/d/1", | |
| ["/r/2"] = "/d/2", | |
| } | |
| if REDIR_R[ngx.var.uri] then | |
| return ngx.redirect(REDIR_R[ngx.var.uri]); | |
| end | |
| '; |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| aliyun.yml | |
| *.csv |
| require 'socket' | |
| require 'pp' | |
| require 'xdr' | |
| # Inspiration | |
| # https://github.com/fastly/ganglia/blob/master/lib/gm_protocol.x | |
| # https://github.com/igrigorik/gmetric/blob/master/lib/gmetric.rb | |
| # https://github.com/ganglia/monitor-core/blob/master/gmond/gmond.c#L1211 | |
| # https://github.com/ganglia/ganglia_contrib/blob/master/gmetric-python/gmetric.py#L107 |