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 -e | |
# Cordons and drains a node pool | |
display_usage() { | |
echo "Cordons and drains a nodepool" | |
echo -e "\nUsage:\n ./cordon-drain-pool [nodepool-name] " | |
echo -e " ./cordon-drain-pool pool-1 \n" | |
} | |
if [ $# -le 1 ] | |
then |
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
haproxy.conf: | |
http-request redirect location %[path,lower,map(/etc/haproxy/redirects-path.map)] code 301 if { path,lower,map(/etc/haproxy/redirects-path.map) -m found } | |
redirects-path.map: | |
/help /en/help/help.html | |
/sitemap /en/sitemap.xml |
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
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
______ ______ ______ __ __ __ ______ | |
/\ == \ /\ __ \ /\__ _\ /\ \/ / /\ \ /\__ _\ | |
\ \ __< \ \ \/\ \ \/_/\ \/ \ \ _"-. \ \ \ \/_/\ \/ | |
\ \_____\ \ \_____\ \ \_\ \ \_\ \_\ \ \_\ \ \_\ | |
\/_____/ \/_____/ \/_/ \/_/\/_/ \/_/ \/_/ | |
This is a simple Slack bot built with Botkit. The bot is called 'holocron' and will go get a Star Wars article (from Wookiepedia) | |
if you mention or direct mention the bot with a search term. |
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
//./app/modules/Analytics.jsx | |
var React = require('react'); | |
var Fluxxor = require('fluxxor'); | |
var FluxMixin = Fluxxor.FluxMixin(React); | |
var paths = require('../helpers/paths'); | |
var Analytics = React.createClass({ | |
displayName: 'Analytics', | |
mixins: [FluxMixin], |
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
var React = require('react/addons'), | |
TestUtils = React.addons.TestUtils, | |
TestContext = require('./TestContext'), | |
App = require('./App.jsx'), | |
app = TestContext.getRouterComponent(App); | |
describe('App', function() { | |
it('has something', function() { | |
expect(app.getDOMNode().textContent).toContain('something'); | |
}); |
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
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |