Skip to content

Instantly share code, notes, and snippets.

View mstine's full-sized avatar

Matt Stine mstine

View GitHub Profile
// Name: PARA
import "@johnlindquist/kit"
let { roots, write } = await db("db/para-roots.json", { roots: [] })
onTab("PARA-Roots", async () => {
while (true) {
let activeRoot = await arg("Set active PARA Root:", roots)
let pRoots = _.partition(roots, activeRoot)
@mstine
mstine / mastodonTootForever.js
Created November 16, 2022 02:29
Mastodon Toot Forever! - User Script for Tampermonkey
// ==UserScript==
// @name Mastodon Toot Forever!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Change the "Publish!" button to "Toot!" - Known to work on Mastodon 4.0.2
// @author Matt Stine
// @match https://mastodon.sdf.org/*
// @icon https://img.icons8.com/external-happy-man-bomsymbols-/512/external-fart-happy-man-human-resource-and-life-style-set-2-happy-man-bomsymbols-.png
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js

Keybase proof

I hereby claim:

  • I am mstine on github.
  • I am mstine (https://keybase.io/mstine) on keybase.
  • I have a public key whose fingerprint is B704 A54C 845D 005D 1D9D 2775 02B0 8975 E3F0 C764

To claim this, I am signing this object:

@mstine
mstine / gist:dd58c6c0e6dc717b291d
Created July 6, 2015 21:40
Hello Kafka SI world...
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-kafka="http://www.springframework.org/schema/integration/kafka"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
@mstine
mstine / gist:8061861
Created December 20, 2013 21:29
AppFirst + CF Release 151 on vSphere
---
name: test
director_uuid: 46beb722-f241-4419-a0b5-dcba70805116
releases:
- name: lite
version: 151.9-dev
networks:
- name: default
@Configuration
@PropertySource("classpath:application.properties")
public class AppConfig {
@Autowired
private Environment env;
@Bean
public DriverManagerDataSource dataSource() {
final DriverManagerDataSource driverManagerDataSource =
@mstine
mstine / gist:4962020
Created February 15, 2013 17:45
The problem child...all of the classes are making it in to the "uberJar," but the resources are not.
task uberJar(type: Jar) {
baseName = "foo-cacheserver-uberjar"
from {
sourceSets.main.output.classesDir
sourceSets.main.output.resourcesDir
configurations.compileNoGemFire.collect { it.isDirectory() ? it : zipTree(it) }
}
}
@mstine
mstine / gist:a955dd0a4b0041c3de0d
Created October 14, 2015 17:53
On modeling dependencies in complex systems...
Excerpt from an email I sent during May 2011:
I've been doing some research into this whole DevOps space as part of
my efforts focused on improving our continuous delivery pipelines at
<REDACTED>. Of course one of my main avenues is to harness otherwise
non-productive time listening to podcasts, and yesterday I happened
upon DevOps Cafe. It seems this guy named Tim Berglund did an
interview with these guys last summer around the theme of his
"Complexity Theory and Software Development" talk. ;-) I listened to
about half of it on the way in to the office this morning.
@mstine
mstine / Lucky13.java
Created December 10, 2010 04:55
Solution to Lucky 13 Contest
import org.codehaus.jackson.map.ObjectMapper;
import java.util.Map;
import java.net.URL;
import java.io.*;
public class Lucky13 {
public int pay(int bet) throws Exception {
return new ObjectMapper().readValue(new BufferedReader(new InputStreamReader(new URL("http://roulette.engineyard.com/")
.openStream())).readLine(), Map.class).get("winning_number").equals("13") ? 35 * bet : 0;
}