Skip to content

Instantly share code, notes, and snippets.

View raananraz's full-sized avatar

Raanan Raz raananraz

View GitHub Profile
@raananraz
raananraz / gist:5c466d6208a0f1429f20
Created April 29, 2015 17:03
FSTObjectInput - OutOfMemoryError
public static void main(String[] args) throws Exception {
File temp = File.createTempFile("test", "dat");
final int BUFFER_SIZE_IN_BYTES = 10 * 1024 * 1024;
final int MAX_ITEMS_BEFORE_FLUSH = 10000;
final int NUMBER_OF_ITEMS = 1000000;
try {
<?php
define("AWS_KEY","YOUR KEY");
define("AWS_SECRET","YOUR SECRET KEY");
define("AWS_REGION","REGION OF THE LOAD BALANCER");
define("ELB_NAME","YOUR ELB NAME");
define("INSTANCE_ID","CURRENT INSTANCE ID - TO BE EXLUCDED FROM THE TEST");
//no cache headers
header("Expires: 0");
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule YOUR_HEALTH_CHECK_URL$ /aws.php [L]
# Only rewrite to index.php if the current request is not for an existing file or directory
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.html [L]