I'm using Homebrew to stop the service
brew services stop mysql
| const logger = require('winston'); | |
| const invalidate = require('invalidate-module'); | |
| const { resolve } = require('path'); | |
| const chokidar = require('chokidar'); | |
| process.on('unhandledRejection', (reason, p) => { | |
| logger.error('Unhandled Rejection at: Promise ', p, reason); | |
| }); | |
| const src = (...args) => resolve(__dirname, ...args); |
| options: | |
| docker: true | |
| pipelines: | |
| branches: | |
| master: | |
| - step: | |
| image: google/cloud-sdk:latest | |
| name: Deploy to production | |
| deployment: production | |
| caches: |
| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| require 'JSON' | |
| require 'digest/sha2' | |
| require 'pry' | |
| require 'bigdecimal' | |
| require 'bitcoin' # Because I need to cheat every now and then | |
| # Usage: | |
| # gem install pry json ffi ruby-bitcoin |
| /** | |
| * WkHtmlToPdf table splitting hack. | |
| * | |
| * Script to automatically split multiple-pages-spanning HTML tables for PDF | |
| * generation using webkit. | |
| * | |
| * To use, you must adjust pdfPage object's contents to reflect your PDF's | |
| * page format. | |
| * The tables you want to be automatically splitted when the page ends must | |
| * have a class name of "splitForPrint" (can be changed). |
| _.mixin({ | |
| // Polls condition indefinitely every N milliseconds and executes | |
| // a function once the condition has passed. | |
| retry: function(func, cond, wait) { | |
| var args = slice.call(arguments, 3); | |
| if (cond()) { | |
| func.apply(this, args); | |
| } else { | |
| _.delay.apply(this, [_.retry, wait, func, cond, wait].concat(args)); | |
| } |