The storms that hit the US this weekend killed more American civilians in a single day than terrorists have in the last 9 years. Yet NOAA funding is set to be cut. Good job America.
The IWF are the quango who have taken it upon themselves to filter bits of the Internet in the UK. ISPs then subscribe to a list of blocked domains and individual URLs.
the IWF want to only block individual URLs. Unfortunately, this can only be done at the HTTP layer since URLs exist at this layer, which means its necessary to proxy all traffic through a HTTP proxy. This is done by your ISP routing any packets addressed to, say Fileserve’s IP address, to their own proxy instead of to Fileserve’s servers. Your ISP’s proxy then checks to see if the url is blocked. If it is, several different things may happen depending on your ISP. In some cases the connection is dropped. In others a 404 File Not Found (dishonest) or a 403 Forbidden (honest) is returned. If the URL isn’t blocked, the ISP’s proxy will make the request on your behalf to Fileserve and respond with Fileserve’s response.
The App Engine datastore saves data objects, known as entities. An entity has one or more properties, named values of one of several supported data types. For instance, a property can be a string, an integer, or even a reference to another entity.
SELECT first_name, last_name
FROM Employees
WHERE date_of_birth > '12/31/1950' ;
变成了
SELECT MAX( CASE emp_property WHEN 'first_name'
THEN value
END ) AS first_name,
MAX( CASE emp_property WHEN 'last_name'
THEN value
END ) AS last_name
FROM EmployeeValues
WHERE emp_nbr IN ( SELECT emp_nbr
FROM EmployeeValues
WHERE emp_property = 'date_of_birth'
AND CAST( value AS DATETIME ) > '12/31/1950' )
AND emp_property IN ( 'first_name', 'last_name' )
GROUP BY emp_nbr ;
But you can't safely just forward TCP packets over a TCP session (like ssh), because TCP's performance depends fundamentally on packet loss; it must experience packet loss in order to know when to slow down! At the same time, the outer TCP session (ssh, in this case) is a reliable transport, which means that what you forward through the tunnel never experiences packet loss. The ssh session itself experiences packet loss, of course, but TCP fixes it up and ssh (and thus you) never know the difference. But neither does your inner TCP session, and extremely screwy performance ensues.
sshuttle assembles the TCP stream locally, multiplexes it statefully over an ssh session, and disassembles it back into packets at the other end. So it never ends up doing TCP-over-TCP. It's just data-over-TCP, which is safe.
和VPN相比sshuttle是stateful的,和ssh相比sshuttle lets you use the "real" IP addresses of each host rather than faking port numbers on localhost.
set -e
echo "Encrypting $2 for $1."
# make a directory to store results for this site
mkdir -p results/$1
# get that site's SSL certificate, validating it with the cacert.pem we have
echo "QUIT" | openssl s_client -CAfile cacert.pem -connect $1:443 > results/$1/cert.pem
# generate a random password from urandom
dd if=/dev/urandom of=results/$1/pass.txt bs=1 count=96
# use the raw password and AES to encrypt the output
openssl enc -a -aes-256-cbc -salt -in $2 -out results/$1/file.enc -pass file:results/$1/pass.txt
# then, use the above public cert to encrypt the pass key
openssl rsautl -encrypt -inkey results/$1/cert.pem -pubin -certin -in results/$1/pass.txt -out results/$1/pass.enc
# finally, delete the password so it's not around and accidentally leaked
rm results/$1/pass.txt
echo "ALL DONE"
1: Turn all ligatures off, and make sure the tracking is set to “0”.
2: Type values. Use “+” to connect values into the same chart.
3: Adjust colors if desired.
4: Turn standard ligatures on, and enjoy!
According to Stackoverflow ERDAS ER VIewer is the best tool to view GeoTIFF files. But their websites requires registration to download, I fucking hate them. Here is the direct download link without the registration form crap:
ERDAS ER Viewer is a free, easy-to-use image viewer featuring interactive roaming and zooming with very large JPEG 2000 and ECW files. It can also read most other common file types. Installing ERDAS ER Viewer also lets you embed large geospatial images in your Microsoft Word documents.
File formats supported: JPEG 2000, ECW, Universal Data Format (UDF) images, ER Mapper images, TIFF and GeoTIFF images, SPOT View images, ESRI BIL (ARC/INFO and ArcView) images, Smart Data ER Mapper algorithms, National Imagery , ransmission Format (NITF), ERDAS Imagine (IMG), ArcInfo ASCII Grid (ASC), Portable Network Graphics (PNG), USGS SDTS (DEM)
BTW my wallpaper project is completely insane. Each GeoTIFF tile is about 500 to 1,000 megabytes, and there are 32 tiles. I am looking for a tool that can merge these huge files. And God bless industrial large format printers can handle these files :)
Do not go upon what has been acquired by repeated hearing,
nor upon tradition,
nor upon rumor,
nor upon what is in a scripture,
nor upon surmise,
nor upon an axiom,
nor upon specious reasoning,
nor upon a bias towards a notion that has been pondered over,
nor upon another's seeming ability,
nor upon the consideration, "The monk is our teacher."
protected void setResponseContentHeaders(HttpResponseBuilder response, HttpResponse results) {
// We're skipping the content disposition header for flash due to an issue with Flash player 10
// This does make some sites a higher value phishing target, but this can be mitigated by
// additional referer checks.
if (!isFlash(response.getHeader("Content-Type"), results.getHeader("Content-Type"))) {
response.setHeader("Content-Disposition", "attachment;filename=p.txt");
}
if (results.getHeader("Content-Type") == null) {
response.setHeader("Content-Type", "application/octet-stream");
}
}
private static final String FLASH_CONTENT_TYPE = "application/x-shockwave-flash";
/**
* Test for presence of flash
*
* @param responseContentType the Content-Type header from the HttpResponseBuilder
* @param resultsContentType the Content-Type header from the HttpResponse
* @return true if either content type matches that of Flash
*/
private boolean isFlash(String responseContentType, String resultsContentType) {
return StringUtils.startsWithIgnoreCase(responseContentType, FLASH_CONTENT_TYPE)
|| StringUtils.startsWithIgnoreCase(resultsContentType, FLASH_CONTENT_TYPE);
}
$isShockwaveFlash = false;
foreach ($cleanedResponseHeaders as $key => $val) {
header("$key: $val", true);
if (strtoupper($key) == 'CONTENT-TYPE' && strtolower($val) == 'application/x-shockwave-flash') {
// We're skipping the content disposition header for flash due to an issue with Flash player 10
// This does make some sites a higher value phishing target, but this can be mitigated by
// additional referer checks.
$isShockwaveFlash = true;
}
}
if (! $isShockwaveFlash && !Config::get('debug')) {
header('Content-Disposition: attachment;filename=p.txt');
}
Here is what a proxy request looks like:
GET / HTTP/1.1
User-Agent: Mozilla/5.0 (compatible) Feedfetcher-Google; (+http://www.google.com/feedfetcher.html)
X-shindig-dos: on
Cache-Control: no-cache, no-store
Host: xxx.xxx.xxx
X-Forwarded-For: xxx.xxx.xxx.xxx
Accept-Encoding: gzip
One more note, you can use &rewriteMime=image/*& in your request to modify MIME.
这是我目前发现最好看的一部新剧了。据说人气超过《Community》了。故事主要讲美国一个卖搞怪小玩意儿公司Mid America Novelties把call center业务外包到印度之后发生在孟买,因为文化冲突,一个白人主管和n个印度员工之间各种非常搞笑事。和TBBT那些僵硬的笑话相比,《Outsourced》更加幽默和轻松愉快。