Based on documentation from ElasticSearch about snapshots
- Create on elasticsearch node a backup folder
mkdir /srv/webplatform/elastic_backup
chown -R elasticsearch:elasticsearch /srv/webplatform/elastic_backup
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* Modified by Steve Jenkins <steve stevejenkins com> to invalidate a single file via URL. | |
* | |
* Steps: | |
* 1. Set your AWS Access Key | |
* 2. Set your AWS Secret Key | |
* 3. Set your CloudFront Distribution ID (or pass one via the URL with &dist) | |
* 4. Put cf-invalidate.php in a web accessible and password protected directory |
name: ${HOSTNAME} | |
# The cluster should be named with the name of the AD domain | |
cluster: | |
name: bldrprod-0.14.0 | |
routing: | |
allocation: | |
# As small as possible, very large performance hits during recovery | |
concurrent_recoveries: 1 |
# Index | |
--------------------------------------------------------------------- | |
curl -XPUT http://localhost:9200/pictures/ -d ' | |
{ | |
"settings": { | |
"analysis": { | |
"analyzer": { | |
"index_analyzer": { | |
"tokenizer": "standard", |
$ redis-cli | |
> config set stop-writes-on-bgsave-error no |
function ValidateGooglePlaySignature( $responseData, $signature, $publicKey, &$status, &$response ) | |
{ | |
$responseData = trim( $responseData ); | |
$signature = trim( $signature ); | |
$response = json_decode( $responseData ); | |
// Create an RSA key compatible with openssl_verify from our Google Play sig | |
$key = "-----BEGIN PUBLIC KEY-----\n". | |
chunk_split($publicKey, 64,"\n"). | |
'-----END PUBLIC KEY-----'; |
var kue = require('kue'), | |
jobs = kue.createQueue(), | |
util = require('util'), | |
noop = function() {}; | |
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days | |
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day | |
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days | |
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
<? | |
require("redis.php"); | |
require("json.php"); | |
$term = $_GET['term']; | |
$r = new Redis("127.0.0.1","6379"); | |
$r->connect(); | |
$items = $r->zrangebylex("kernel","[$term","[$term\xff",Array("LIMIT","0","10")); |
############## UPDATE UBUNTU ############## | |
sudo local-gen UTF-8 | |
sudo apt-get update | |
sudo apt-get upgrade | |
############## GIT ############## | |
$ sudo add-apt-repository ppa:git-core/ppa | |
$ sudo apt-get update |
Based on documentation from ElasticSearch about snapshots
mkdir /srv/webplatform/elastic_backup
chown -R elasticsearch:elasticsearch /srv/webplatform/elastic_backup