Every couple of weeks, I hear someone complaining about some difficulties with Bundler. Yesterday, it happened twice. But somehow I just never have those difficulties. I'm not saying Bundler is perfect; certainly in its early days it wasn't even close. But for the past two years it's been incredibly solid and trouble-free for me, and I think a large part of the reason is the way I use it. Bundler arguably does too much, and just as with Git, a big part of it is knowing what not to do, and configuring things to avoid the trouble spots.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'beanstalk-client' | |
if ARGV.length > 0 && ARGV[0] == 'config' | |
puts "graph_title Beanstalk Queue Size" | |
puts "graph_vlabel watching" | |
puts "watching.label Watching" | |
puts "graph_vlabel reserved" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Sounder sounds for class | |
# Requires an active microphone to pick up anything | |
require 'ruby-processing' | |
class MinimTest < Processing::App | |
load_library "minim" | |
import "ddf.minim" | |
import "ddf.minim.analysis" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/opt/ruby-enterprise/bin/ruby | |
# MODIFIED: Minor fork to run smoothly under Ruby 1.8.6. Heredoc cleanup. | |
require 'rubygems' | |
require 'beanstalk-client' | |
if ARGV.length > 0 && ARGV[0] == 'config' | |
puts <<-END | |
graph_category App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Tomas Osland | |
;; [email protected] | |
;; @tomasosland | |
;; Welcome to this presentation about functional music. In this lightning talk we | |
;; will construct a drum machine and make som beats, play the piano, and experiment with synthesizers. | |
;; Start overtone.cid | |
(ns overtone.examples.timing.one-bar-sequencer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a31eb2863043937881e51cffb544ef9a641a62af Mon Sep 17 00:00:00 2001 | |
From: Yorick Peterse <SNIP> | |
Date: Thu, 12 Mar 2015 11:08:46 +0100 | |
Subject: [PATCH] Added a simple Maybe monad. | |
This is a rather simple implementation of the Maybe monad [1] / Option type [2]. | |
It only provides the absolute bare-minimum instead of providing a fully blown | |
functional programming library. | |
Using this class allows you to turn code such as this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;original | |
(filter filter-fn some-collection) | |
;parallel filter | |
(map :val (filter (fn [m] (:allowed-by-filter m)) | |
(pmap (fn [v] {:val s :allowed-by-filter (filter-fn v)}) some-collection))) |
OlderNewer