Skip to content

Instantly share code, notes, and snippets.

@systemfreund
systemfreund / cycler.js
Last active December 27, 2015 14:39
Use this in a .slate.js configuration to cycle through a list of applications.
// Usage:
//
// slate.bind("1:cmd;alt", Cycler(["Safari", "Google Chrome", "Firefox"]));
//
var Cycler = (function() {
function Cycler(appNames, cycleWindows) {
this.appNames = appNames;
this.cycleWindows = cycleWindows;
this.lastIndex = -1;
@systemfreund
systemfreund / stream-twitter.sh
Last active November 9, 2021 17:14
Twitter stream integration for mattermost
#!/bin/bash
# dependencies:
# curl
# culicue - curl wrapper to make oauthv1 requests (https://github.com/decklin/curlicue/blob/master/curlicue)
# jq - filter json from twitter api and transform to a structure mattermost is expecting
# credentials file can be created with the curlicue-setup script
credentials=/home/me/credentials.conf
webhook='https://yourmattermost.server/hooks/1mjxx6amd52q8doxzy16o75adh'