Skip to content

Instantly share code, notes, and snippets.

@calebsmith
calebsmith / piano.scm
Created January 30, 2014 05:02
First pass at Weechat plugin to control pianobar (CLI Pandora/Last.fm client)
(use-modules (ice-9 popen))
(weechat:register "piano" "MCConsALot" "0.1" "GPL3" "Control piano bar client" "" "")
(weechat:hook_command
"piano" "Control pianobar"
"[command]" "command to send to pianobar. Use /piano start, to begin"
"start next quit station send"
"main-command-handler" "")
@calebsmith
calebsmith / gist:8578779
Created January 23, 2014 13:57
Simple ping/pong Erlang program
-module(ping_module).
-export([start/1, ping/2, pong/1, ending_timer/0]).
ping(0, Pong_PID) ->
Pong_PID ! finished,
io:format("ping finished~n", []);
ping(N, Pong_PID) ->
io:format("Sending ping~n", []),
Pong_PID ! {ping, self()},
{
"metadata": {
"name": "Untitled1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{