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
const Heroku = require('heroku-client') | |
const heroku = new Heroku({ token: process.env.HEROKU_API_TOKEN }) | |
const main = async () => { | |
const apps = (await heroku.get(`/apps`)).map(m => { return { created_at: m.created_at, name: m.name, stack: m.stack.name } }) | |
console.log(['App Name', 'Created At', 'Stack', 'Version', 'Description', 'Released At', 'User'].join('\t')) | |
for (app of apps) { | |
const releases = await heroku.get(`/apps/${app.name}/releases`) |
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
#!/usr/bin/env python3 | |
import click | |
import requests | |
# Create a group for all subcommands | |
# http://click.palletsprojects.com/en/7.x/quickstart/#nesting-commands | |
@click.group() | |
@click.option('--host', default='https://bounceradmin-default.dev.mozaws.net', show_default=True) | |
@click.option('--username') |
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
diff --git a/Dockerfile b/Dockerfile | |
index 49dbc0e1..0a38cf1b 100644 | |
--- a/Dockerfile | |
+++ b/Dockerfile | |
@@ -1,10 +1,8 @@ | |
FROM php:5.6-apache | |
MAINTAINER iteratec WPT Team <[email protected]> | |
-RUN echo deb http://www.deb-multimedia.org jessie main non-free >> /etc/apt/sources.list && \ | |
- apt-get update && \ |
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
'use strict'; | |
const AWS = require('aws-sdk') | |
const main = async () => { | |
const env = process.argv[2] | |
const regions = { | |
'eu-west-1': { | |
data_processing_cost: 0.008, | |
lcu_cost: 0.008 |
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
gh-ost \ | |
--max-load=Threads_running=25 \ | |
--assume-rbr \ | |
--critical-load=Threads_running=1000 \ | |
--chunk-size=1000 \ | |
--max-lag-millis=15000 \ | |
--user="" \ | |
--password="" \ | |
--host="" \ | |
--assume-master-host="" \ |
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
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'; | |
+--------------------------+-------------------+ | |
| Variable_name | Value | | |
+--------------------------+-------------------+ | |
| character_set_client | utf8 | | |
| character_set_connection | utf8 | | |
| character_set_database | latin1 | | |
| character_set_filesystem | binary | | |
| character_set_results | utf8 | | |
| character_set_server | latin1 | |
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 -o errexit | |
set -o pipefail | |
set -o nounset | |
# set -o xtrace | |
COUNT=60 | |
REDIS_HOST=$2 |
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
$ ./stats.sh | |
Wed May 04: 433.9 Today: 303.0 Change: -30.2% | |
Tue May 03: 505.1 Today: 303.0 Change: -40.0% | |
Mon May 02: 485.5 Today: 303.0 Change: -37.6% | |
Sun May 01: 448.9 Today: 303.0 Change: -32.5% | |
Sat Apr 30: 451.9 Today: 303.0 Change: -32.9% | |
Fri Apr 29: 799.5 Today: 303.0 Change: -62.1% | |
Thu Apr 28: 841.0 Today: 303.0 Change: -64.0% | |
Wed Apr 27: 817.0 Today: 303.0 Change: -62.9% | |
Tue Apr 26: 366.7 Today: 303.0 Change: -17.4% |
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
CREATE USER 'fxa_sproc_def'; | |
GRANT ALL PRIVILEGES ON fxa.* TO 'fxa_sproc_def'; | |
UPDATE `mysql`.`proc` p SET definer = 'fxa_sproc_def@%' WHERE definer='root@localhost' | |
CREATE USER 'fxa_user_1'; | |
GRANT EXECUTE ON PROCEDURE fxa.* to 'fxa_user_1'; | |
CREATE USER 'fxa_user_2'; | |
GRANT EXECUTE ON PROCEDURE fxa.* to 'fxa_user_2'; |
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 | |
DOMAIN="$1" | |
OLD_RECORDS="`dig +short @8.8.8.8 $DOMAIN A | sort`" | |
echo `date` $OLD_RECORDS | |
while true; do | |
sleep 30 | |
NEW_RECORDS="`dig +short @8.8.8.8 $DOMAIN A | sort`" |
NewerOlder