Skip to content

Instantly share code, notes, and snippets.

View mattnworb's full-sized avatar

Matt Brown mattnworb

View GitHub Profile
@mattnworb
mattnworb / gist:4dd3f7fd34089f4f701a9fb03c460596
Created August 4, 2022 12:33
javap output for com/spotify/feline/Feline.class from futuristic-feline-1.1.1.jar
$ javap -v -p 'jar:file:///Users/mattbrown/.m2/repository/com/spotify/futuristic-feline/1.1.1/futuristic-feline-1.1.1.jar!/com/spotify/feline/Feline.class'
Classfile jar:file:///Users/mattbrown/.m2/repository/com/spotify/futuristic-feline/1.1.1/futuristic-feline-1.1.1.jar!/com/spotify/feline/Feline.class
Last modified Jun 10, 2022; size 9273 bytes
MD5 checksum 7f6651da5b4dcf1561076b0d6a284d42
Compiled from "Feline.java"
public class com.spotify.feline.Feline
minor version: 0
major version: 52
flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: #24 // com/spotify/feline/Feline
num_addresses
0 437
1 586
2 689
3 212
4 39
5 28
6 15
7 10
8 26
$ TF_LOG=trace terraform init
2019/07/29 13:31:41 [INFO] Terraform version: 0.12.5
2019/07/29 13:31:41 [INFO] Go runtime version: go1.12.4
2019/07/29 13:31:41 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.1/versions/0.12.5/terraform", "init"}
2019/07/29 13:31:41 [DEBUG] Attempting to open CLI config file: /Users/mattbrown/.terraformrc
2019/07/29 13:31:41 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/07/29 13:31:41 [INFO] CLI command args: []string{"init"}
2019/07/29 13:31:41 [TRACE] ModuleInstaller: installing child modules for . into .terraform/modules
Initializing modules...
2019/07/29 13:31:41 [DEBUG] Module installer: begin asia-east1-REDACTED

Keybase proof

I hereby claim:

  • I am mattnworb on github.
  • I am mattnworb (https://keybase.io/mattnworb) on keybase.
  • I have a public key ASA2R90XEzfq-WWr7zjFHZIlqA4LGdPk84bTSOt7JjgJ7wo

To claim this, I am signing this object:

@mattnworb
mattnworb / Vagrantfile
Created April 7, 2014 19:04
Sample Vagrantfile to run MySQL on a centos vm
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# downloads a CentOS 6.5 base image for the VM from https://vagrantcloud.com/chef/centos-6.5
# although the box is from the people that make Chef, we use Ansible below for provisioning the VM
config.vm.box = "chef/centos-6.5"
override def query(q: String) = {
val responses: Seq[Future[HttpResponse]] = clients.map {client => client.query(q)}
val allResponses: Future[Seq[HttpResponse]] = Future.collect(responses)
val successResponses: Future[Seq[HttpResponse]] = allResponses.map(responses => responses.filter(_.getStatus == HttpResponseStatus.OK))
successResponses.map { responses: Seq[HttpResponse] =>
if (responses.isEmpty) {
errorResponse(HttpResponseStatus.INTERNAL_SERVER_ERROR, "No successful responses")
<!DOCTYPE html>
<html>
<head>
<title>Service Dependencies</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script>
<style type="text/css">
circle.node {
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.TimeUnit;
InputStream inputstream = process.getInputStream();
BufferedReader br = new BufferedReader(new InputStreamReader(inputstream));
String line;
while ((line = br.readLine()) != null) {
// handle the new line of input from the process however you want
gsc.mainWindow.printf("Got another line! " + line);
// do anything else you want with the input - send it as many places as you like
}
@mattnworb
mattnworb / print_times.coffee
Created February 17, 2012 16:17
Loops over a file containing one JSON entry per line and prints out the created_at value . This gist shows the original coffeescript and the generated JavaScript
fs = require 'fs'
unless process.argv.length > 2
console.error "Usage: print_times <file>"
process.exit -1
fileName = process.argv[2]
String::endsWith = (ch) ->
return @length - 1 == @lastIndexOf(ch)