This file contains 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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: graylog2 | |
# Required-Start: elasticsearch | |
# Required-Stop: elasticsearch | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts GrayLog2 | |
# Description: Starts GrayLog2 using start-stop-daemon | |
### END INIT INFO |
This file contains 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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: graylog2-web | |
# Required-Start: $graylog2 | |
# Required-Stop: $graylog2 | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Starts graylog2-web | |
# Description: Starts graylog2-web using start-stop-daemon | |
### END INIT INFO |
This file contains 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
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- apt: pkg={{ item }} state=latest | |
with_items: | |
- vim | |
- git | |
- tar | |
- apache2 |
This file contains 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
{ | |
"Version":"2012-10-17", | |
"Statement":[ | |
{ | |
"Sid":"Stmt9dsun432j", | |
"Effect":"Allow", | |
"Action":[ | |
"elasticloadbalancing:CreateLBCookieStickinessPolicy", | |
"elasticloadbalancing:SetLoadBalancerPoliciesOfListener", | |
"elasticloadbalancing:DescribeInstanceHealth", |
This file contains 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: OrderController | |
--- | |
OrderController: | |
dependencies: | |
mailerService: %$MailerService | |
Injector: | |
MailerService: | |
factory: MailerFactory | |
MailerFactory: | |
class: MailerFactoryImplementation |
This file contains 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
(* | |
Install in /Library/iTunes/Scripts | |
*) | |
tell application "iTunes" | |
if selection is {} then | |
display dialog "No tracks selected. Select some tracks with some stale tags." buttons {"I will!"} ¬ | |
default button 1 with icon 0 | |
else |
This file contains 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 | |
use Aws\DynamoDb\DynamoDbClient; | |
use Aws\DynamoDb\Session\SessionHandler; | |
// DISCLAIMER: untested and should just be used as guideline | |
// | |
// Either fetches the required credentials from the ec2 server or requires to add them to a _ss_environment.php file | |
// AWS_REGION_NAME <- required | |
// AWS_DYNAMODB_SESSION_TABLE <- required | |
// AWS_SECRET_KEY |
This file contains 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 | |
$dateFrom = DateTime::createFromFormat('d/m/Y', '03/11/2014'); | |
$dateTo = DateTime::createFromFormat('d/m/Y', '02/01/2015'); | |
$difference = $dateFrom->diff($dateTo); | |
// diff in years, months and years | |
echo $difference->y.' '.$difference->m.' '.$difference->d.PHP_EOL; |
This file contains 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
--- a/cwp/files/repos/deploynaut-lib/cwptasks.rb | |
+++ b/cwp/files/repos/deploynaut-lib/cwptasks.rb | |
@@ -5,26 +5,9 @@ namespace :deploy do | |
# We are deploying to both sides, signal to csync2 that we want it disabled, and wait for it to finish. | |
task :disable_csync do | |
run "touch #{deploy_to}/csync2.disable" | |
- | |
- # Check lock by trying to acquire it for one minute (36 checks, 5s delay). | |
- # Outer bash is needed for the loop to function correctly. | |
- begin |
This file contains 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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/", | |
"Mappings" : { | |
"RegionMap" : { | |
"eu-central-1" : { "AMI" : "ami-e8c6f0f5" }, | |
"ap-northeast-1" : { "AMI" : "ami-858eb884" }, | |
"sa-east-1" : { "AMI" : "ami-7b922666" }, | |
"ap-southeast-2" : { "AMI" : "ami-13abc629" }, | |
"ap-southeast-1" : { "AMI" : "ami-7e78592c" }, |