Skip to content

Instantly share code, notes, and snippets.

@bmatheny
bmatheny / compliments.json
Last active December 4, 2023 00:16 — forked from E3V3A/compliments.json
MagicMirror compliments file
{
"anytime" : [
"I'm lucky to be your mirror!",
"The Force is strong with you",
"If I could high five you... I would!",
"On a scale from 1 to 10, you're an 15!",
"Being awesome is hard, but you'll manage",
"I could just hang here all day!",
"Looking good!",
"May the Force be with you",
@bmatheny
bmatheny / install_ruby_rpi.sh
Last active September 18, 2022 19:33 — forked from KEINOS/install_ruby_rpi.sh
A Bash script to install Ruby 2.6.8 on the Raspberry Pi OS
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.6.8 using rbenv/ruby-build on the Raspberry Pi OS
#
# Run from the web:
# bash <(curl -sL https://gist.githubusercontent.com/bmatheny/f7cef71291d1ea3175b6d9d1bf312a3e/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
@bmatheny
bmatheny / gist:991247
Created May 25, 2011 16:02
curl_multi speed for PHP
<?php
class CurlMulti
{
// Code from http://www.somacon.com/p537.php
public static function getMulti(array $urls)
{
// Create get requests for each URL
$mh = curl_multi_init();
foreach($urls as $i => $url)
@bmatheny
bmatheny / gist:4d9b5fab37ba588af312
Created November 16, 2014 15:40
usb overdrive spotify config
-- previous track
on is_running(appName)
tell application "System Events" to (name of processes) contains appName
end is_running
if is_running("Spotify") then
tell application "Spotify"
previous track
end tell
@bmatheny
bmatheny / gist:1069547
Created July 7, 2011 13:49
Why I left Indy (but still think it's great)

Miles recently wrote a post on the Indy Hackers Blog appropriately titled, Why Indy? In the post (http://blog.indyhackers.org/post/7262445527/why-indy) Miles (along with several other hoosiers) enumerates the various great things about why a developer/business might want to live in/stay in/come to Indiana. Having spent 10 of my 31 years in Indiana (4 in West Lafayette, 6 in Indianapolis) I definitely think of myself as a hoosier but despite that I moved to NYC in May. I am in the defector group, but maybe not in the dissenter group.

While I was in Indianapolis I held leadership roles at 3 different startups including ChaCha and Compendium, witnessed a very successful exit at one of my startups (3GUpload.com in 2004), and consulted for a half-dozen other various companies. That is to say, I think I have a pretty good feeling for what Indy has to offer in terms of work. Additionally, I participated in a variety of volunteer organizations (Big Brothers Big Sisters, Leukemia/Lymphoma society, ADA, etc) as well a

package com.tumblr.fibr.service.filter
import com.tumblr.fibr.config.FilterConfig
import com.tumblr.fibr.tsdb.{TsdbRequest, TsdbResponse}
import com.google.common.cache.{Cache, CacheBuilder}
import com.twitter.finagle.Service
import com.twitter.util.Future
import java.util.concurrent.{Callable, TimeUnit}
/**
% pry
[1] pry(main)> puts "Hello, world!"
Hello, world!
=> nil
[2] pry(main)> name = "Cecilia"
=> "Cecilia"
[3] pry(main)> puts "Hello, #{names}"
NameError: undefined local variable or method `names' for main:Object
from (pry):3:in `__pry__'
[4] pry(main)> wtf?
@bmatheny
bmatheny / gist:5060520
Last active December 14, 2015 08:49 — forked from jasoncodes/gist:1223731
# Run this script to install ruby 1.9.2-p290 under rbenv
VERSION=1.9.2-p290
brew update
brew install rbenv ruby-build rbenv-vars readline
if [ -n "${ZSH_VERSION:-}" ]; then
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.zshrc
else
echo 'eval "$(rbenv init - --no-rehash)"' >> ~/.bash_profile
fi
@bmatheny
bmatheny / production.conf
Created November 1, 2012 16:38
Bare minimum collins config
include "validations.conf"
collins_conf_dir = "/Users/bmatheny/Downloads/collins/conf"
# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same
# key!
application.secret="AbFgHx0eJx8lalkja812389uasdlkajsdlka98012398uasdlkasdklajsd81298"
@bmatheny
bmatheny / vim.rb
Created September 23, 2012 16:10 — forked from vesln/vim.rb
Vim Formula with Ruby & Python support for OS X
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
version '7.3.666'
url 'https://vim.googlecode.com/hg/', :revision => '1e22adc6176e'
head 'https://vim.googlecode.com/hg/'
def ruby_bin