Skip to content

Instantly share code, notes, and snippets.

View edmorley's full-sized avatar

Ed Morley edmorley

View GitHub Profile
@edmorley
edmorley / mysql-replication-stats.sh
Created September 28, 2016 11:46
MySQL replication catch-up stats script
#!/usr/bin/env bash
# Updated/fixed version of the script from:
# https://www.percona.com/blog/2012/08/29/heres-a-quick-way-to-foresee-if-replication-slave-is-ever-going-to-catch-up-and-when/
delay=60
echo -e "Stats will be output every ${delay}s...\n"
cmd="mysql -e 'show slave status\G' | awk '/Seconds_Behind_Master/ { print \$2 }'"
while sleep $delay; do
@edmorley
edmorley / webpack4-schema.diff
Last active April 16, 2018 14:45
Webpack options schema diff 3.11.0 -> 4.5.0
--- webpack-options-schema-3.11.0.json 2018-04-16 15:43:29.000000000 +0100
+++ webpack-options-schema-4.5.0.json 2018-04-16 15:43:29.000000000 +0100
@@ -1,1545 +1,1973 @@
{
"additionalProperties": false,
"definitions": {
+ "common.pluginFunction": {
+ "description": "Function acting as plugin",
+ "instanceof": "Function",
+ "properties": {
@edmorley
edmorley / neutrino-npm-audit.log
Created May 18, 2018 22:58
Output of npm audit of Neutrino v8.2.3 monorepo packages
src $ mkdir npm-audit-test
npm-audit-test $ npm init -y
...
npm-audit-test $ npm install neutrino
> [email protected] postinstall C:\Users\Ed\src\npm-audit\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
@edmorley
edmorley / 0x-output.log
Created May 22, 2018 12:18
Output of `0x ./node_modules/webpack/bin/webpack.js --mode production`
This file has been truncated, but you can view the full file.
Profiling(node:8760) ExperimentalWarning: The fs.promises API is experimental
.start.file,
node.start.line,
node.start.col,
node.start.pos
);
}
if (!(node instanceof AST_SymbolFunarg)) mark_export(def, 2);
def.destructuring = in_destructuring;
if (defun !== scope) {
@edmorley
edmorley / exported-config.js
Created September 14, 2018 18:07
React+AirBnB Neutrino presets export
module.exports = {
mode: 'production',
target: 'web',
context: 'C:\\Users\\Ed\\src\\test-project',
stats: {
children: false,
entrypoints: false,
modules: false
},
node: {
@edmorley
edmorley / Dockerfile
Created December 3, 2019 17:19
libpq v12 testcase: ruby-pg
FROM ruby:2.6.5-buster
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /etc/apt/trusted.gpg.d/pgdg.asc
RUN echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update \
&& apt-get install -y --no-install-recommends libpq-dev \
&& rm -rf /var/lib/apt/lists/*
RUN gem install pg