- @TheLeadDev #LeadDevLondon
- white coat captioning - @whitecoatcapxg
- wvnts.co/lduk2018
- happy pride! it’s like the world cup for people with fashion sense
- who am I?
| #!/bin/bash | |
| # This is my production backup script. | |
| # https://sqlgossip.com | |
| set -e | |
| set -u | |
| usage() { | |
| echo "usage: $(basename $0) [option]" | |
| echo "option=full: Perform Full Backup" |
| ### JHW 2018 | |
| import numpy as np | |
| import umap | |
| # This code from the excellent module at: | |
| # https://stackoverflow.com/questions/4643647/fast-prime-factorization-module | |
| import random |
| private static void Main() | |
| { | |
| var defaultIndex = "icecreams"; | |
| var settings = new ConnectionSettings(new Uri("http://localhost:9200")) | |
| .DefaultIndex(defaultIndex) | |
| .DisableDirectStreaming() | |
| .PrettyJson() | |
| .OnRequestCompleted(callDetails => | |
| { |
Most of the hard work is done by @nateevans https://gist.github.com/nateevans/9958390
Thank you!
Requires Twig ^1.2 | ^2.0
{% extends 'knp_menu.html.twig' %}| sub vcl_recv { | |
| # set to Gzip, deflate or remove entirely | |
| if (req.http.Accept-Encoding) { | |
| if (req.url ~ "\.(jpg|jpeg|png|gif|gz|tgz|bz2|tbz|mp3|mp4|ogg)$") { | |
| unset req.http.Accept-Encoding; | |
| } elsif (req.http.Accept-Encoding ~ "gzip") { | |
| set req.http.Accept-Encoding = "gzip"; | |
| } elsif (req.http.Accept-Encoding ~ "deflate") { | |
| set req.http.Accept-Encoding = "deflate"; | |
| } else { |
| # Generate a BaseSystem.dmg with 10.13 Install Packages | |
| hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
| hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
| asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
| cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
| hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
| hdiutil detach /Volumes/highsierra/ | |
| mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
| # Tested on Centos 6.9 and Centos 7.4. ClickHouse vesion 1.1.54236 | |
| # Official build instructions: | |
| # https://github.com/yandex/ClickHouse/blob/master/doc/build.md | |
| # See also https://github.com/redsoftbiz/clickhouse-rpm | |
| # and https://github.com/Altinity/clickhouse-rpm | |
| export THREADS=$(grep -c ^processor /proc/cpuinfo) | |
| # Determine RHEL major version | |
| RHEL_VERSION=`rpm -qa --queryformat '%{VERSION}\n' '(redhat|sl|slf|centos|oraclelinux|goslinux)-release(|-server|-workstation|-client|-computenode)'` |
| const fs = require('fs'); | |
| const file = JSON.parse(fs.readFileSync('./dump.har')).log; | |
| const targetMimeType = 'image/jpeg'; | |
| let count = 1; | |
| for (const entry of file.entries) { | |
| if (entry.response.content.mimeType === targetMimeType) { | |
| // ensure output directory exists before running! | |
| fs.writeFileSync(`output/${count}.png`, new Buffer(entry.response.content.text, 'base64'), 'binary'); | |
| count++; |
| #!/usr/bin/env bash | |
| # https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/ | |
| # https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c | |
| # https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver | |
| # https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception | |
| # https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal | |
| # https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04 | |
| # Versions | |
| CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` |