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
$ mysqldump -u user -p'password' db-name foo | ssh user@remote.box.com mysql -u user -p'password' db-name foo |
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
# define the runtime language | |
runtime "python" | |
stack "python-2.7" | |
full_remote_build true | |
# includes | |
dir "Harvest" | |
file "harvest.json" | |
file "mailgun.json" | |
file "recipients.json" |
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
# define the runtime language | |
runtime "python" | |
stack "python-2.7" | |
full_remote_build true | |
# includes | |
dir "Harvest" | |
file "harvest.json" | |
file "mysql.json" |
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
cat redirects.tsv | sed -e 's/\(^\/\)\([a-zA-Z0-9\/!#$&-;=?%-_a-z~]*\)\(\t*\)\(.*\)/RewriteRule ^\/?\2$\4 [L,R=302]/' |
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 | |
# Set from statuspage.io | |
PAGE_ID="" | |
AUTH_TOKEN="" | |
# Set from statuspage.io Component ID's | |
COMP_SERVERS_NEXT="" | |
COMP_SERVERS_FIRST="" | |
COMP_LOAD_BALANCERS="" |
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 \avatarnewyork\pagerdutysayswebhook; include("classes/pagerdutysays.php"); | |
$pds = new pagerdutysayswebhook\PagerDutySays($HTTP_RAW_POST_DATA); | |
$pds->enableAirPlay(true); | |
$pds->say(); | |
?> |
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
{ "messages": [ { "id": "bb8b8fe0-e8d5-11e2-9c1e-22000afd16cf", "created_on": "2013-07-09T20:25:44Z", "type": "incident.trigger", "data": { "incident": { "id": "PIJ90N7", "incident_number": 1, "created_on": "2013-07-09T20:25:44Z", "status": "triggered", "html_url": "http://acme.pagerduty.com/incidents/PIJ90N7", "incident_key": "null", "service": { "id": "PBAZLIU", "name": "service", "html_url": "http://acme.pagerduty.com/services/PBAZLIU" }, "assigned_to_user": { "id": "PPI9KUT", "name": "Alan Kay", "email": "alan@pagerduty.com", "html_url": "http://acme.pagerduty.com/users/PPI9KUT" }, "trigger_summary_data": { "subject": "45645" }, "trigger_details_html_url": "http://acme.pagerduty.com/incidents/PIJ90N7/log_entries/PIJ90N7", "last_status_change_on": "2013-07-09T20:25: |
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
# JSON extended log format including: User-Agent, Referer, and X-Forwarded-For | |
LogFormat "{ \"time\":\"%t\", \"remoteIP\":\"%a\", \"host\":\"%V\", \"request\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\", \"X-Forwarded-For\":\"%{X-Forwarded-For}i\" }" jsonlog | |
# Pipe only warnings/errors to json log file | |
CustomLog "|/bin/grep -E --invert-match --line-buffered 'status.?[[:punct:]].?[23]' |cat >> /var/log/httpd/errors.json" jsonlog |
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
LogFormat "%s %h %l %u %t \"%r\" %b" splunk | |
CustomLog "|stdbuf -o0 /bin/grep --invert-match '^200' | /usr/sbin/rotatelogs /var/log/apache2/splunk-access.log 86400" splunk |
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
curl -X POST https://identity.api.rackspacecloud.com/v2.0/tokens -d '{ "auth":{ "passwordCredentials":{ "username":"$USER", "password":"$PASSWORD"}}}' -H "Content-type: application/json" |