This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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-----'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ redis-cli | |
| > config set stop-writes-on-bgsave-error no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Index | |
| --------------------------------------------------------------------- | |
| curl -XPUT http://localhost:9200/pictures/ -d ' | |
| { | |
| "settings": { | |
| "analysis": { | |
| "analyzer": { | |
| "index_analyzer": { | |
| "tokenizer": "standard", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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 |
NewerOlder