Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# Saves all dashboards in Kibana to /vagrant/dashboards
# so they can be reloaded if this vagrant instance is destroyed
#
curl -s 'http://localhost:9200/kibana-int/dashboard/_search?pretty=true&fields=' | grep "_id" | sed -E 's/.*"_id" : "(.*)",/\1/' | while read -r line; do curl -s -X GET http://localhost:9200/kibana-int/dashboard/$line/_source > /vagrant/dashboards/$line.json; done
@brianlow
brianlow / kafka-from-cli.md
Last active May 30, 2018 01:38 — forked from crcastle/kafka-from-cli.md
Kafka CLI example using Apache Kafka on Heroku
@brianlow
brianlow / varnish3.rb
Last active January 7, 2019 17:55 — forked from aslam/varnish3.rb
Install Varnish-3.0.7 on OSX with homebrew
##
# Install Varnish 3.0.7 on OSX with the following Brew command:
# $> brew install https://gist.github.com/brianlow/674897ef935c2aae2f6cdae41c17766f/raw/varnish.rb
#
# You also might have to run:
# $> sudo brew link varnish3
# To symlink the install.
##
require 'formula'
@brianlow
brianlow / _vscode_and_minitest.md
Last active May 25, 2020 23:06
Tasks for VSCode + MiniTest

Press CMD+r to run tests in a VSCode terminal:

  • Run test at cursor
  • Run all test in the current file
  • Re-run the last test run

To install:

  • VSCode -> command palette -> Configure Task.. -> paste in tasks.json
  • VSCode -> command palette -> Open Keyboard Shortcuts (JSON) -> paste
[
@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]
~/dev/qmk_firmware on choc2 ❯ util/docker_build.sh sofle_choc:default
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
QMK Firmware 0.20.5
Making sofle_choc with keymap default
avr-gcc (GCC) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.