Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..."
echo
echo "Replace all occurances of FROM_STRING (a sed-compatible regular"
echo "expression) with TO_STRING in all files for which ack matches"
echo "FROM_STRING."
echo
echo "Any additional options are passed directly to ack (e.g.,"
@joscha
joscha / meteor-async.md
Last active August 29, 2017 06:51 — forked from possibilities/meteor-async.md
Meteor Async Guide

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished.

@joscha
joscha / run_raopx.applescript
Created April 23, 2010 22:59 — forked from samumbach/run_raopx.applescript
added temporary file deletion
-- TODO: save as a bundle and include the RaopX application: not sure if I can do that since it also contains libsamplerate
-- For German OSX
set SoundPrefName to "Ton"
set InputPanelName to "Eingabe"
set OutputPanelName to "Ausgabe"
-- For English OSX uncomment this
-- set SoundPrefName to "Sound"
-- set InputPanelName to "Input"