Skip to content

Instantly share code, notes, and snippets.

@albanpeignier
albanpeignier / metalive_client_for_action.rb
Last active August 29, 2015 14:05
Client Metalive pour déclencer une action
require 'eventmachine'
require 'em-websocket-client'
require 'json'
EM.run do
conn = EventMachine::WebSocketClient.connect("ws://metalive.tryphon.eu:8080/api/streams/test/events.ws")
conn.errback do |e|
puts "Got error: #{e}"
end
@albanpeignier
albanpeignier / 01-rdcatchd-duplicated-messages.log
Created May 30, 2014 07:00
Duplicated messages / event starts (?) in RdCatchd
May 30 00:20:22 rivendellallbox rdcatchd: rdcatchd engine load starts...
May 30 00:20:22 rivendellallbox rdcatchd: loaded 85 events
May 30 00:20:22 rivendellallbox rdcatchd: rdcatchd engine load ends
May 30 00:20:22 rivendellallbox rdcatchd: unable to set realtime permissions, Operation not permitted
May 30 00:20:22 rivendellallbox rdcatchd: rdcatchd started
May 30 00:20:22 rivendellallbox rdcatchd: rdcatchd saveState(), set restart hint to Never
May 30 00:20:32 rivendellallbox rdcatchd: rdcatchd new connection open
May 30 00:20:36 rivendellallbox rdcatchd: rdcatchd dropped connection
May 30 00:21:34 rivendellallbox rdcatchd: rdcatchd exiting
May 30 00:21:56 rivendellallbox rdcatchd: rdcatchd engine load starts...
@albanpeignier
albanpeignier / logheck-rule.sh
Created April 22, 2013 07:45
Logcheck - small tool and Rivendell rules sample
#!/bin/sh -e
command=$1
shift
if [ $# == 0 ]; then
set -- `ls files/logcheck/ignore.d/* | grep -v "~$"`
fi
egrep_files=""
DarkIce 1.1 live audio streamer, http://code.google.com/p/darkice/
Copyright (c) 2000-2007, Tyrell Hungary, http://tyrell.hu/
Copyright (c) 2008-2010, Akos Maroy and Rafael Diniz
This is free software, and you are welcome to redistribute it
under the terms of The GNU General Public License version 3 or
any later version.
Using config file: darkice.cfg.local
04-Apr-2013 20:11:48 Using ALSA DSP input device: hw:Loopback,1,0
04-Apr-2013 20:11:48 buffer size: 882000
Pige::ChunkScheduler.define do |scheduling|
scheduling.day = Date.today.prev_day
scheduling.on(:monday) do
create :title => "Emission Cinema lundi %d_%m_%Y", :begin => "17:00", :duration => 1.hour
create :title => "Chronique 'A Table'", :begin => "13:00", :duration => 5.minutes, :margin => 5.minutes
end
scheduling.on(:tuesday) do
# ...
@albanpeignier
albanpeignier / dont_tap_httparty_response.rb
Created October 27, 2012 10:33
HTTParty::Response doesn't like tap
response = self.class.post(...)
response.error! unless response.success?
response
@albanpeignier
albanpeignier / gist:3878506
Created October 12, 2012 10:03
Rivendell::API example
irb(main):004:0> require 'rivendell/api'
irb(main):005:0> xport = Rivendell::API::Xport.new(:host => "sandbox")
=> #<Rivendell::API::Xport:0x00000002572518 @host="sandbox">
irb(main):006:0> xport.add_cart :group => "MUSIC"
=> #<Rivendell::API::Cart:0x000000022168d8 @number=10002, @type="audio", @group_name="MUSIC", @title="[new cart]", ...
irb(main):008:0> xport.add_cut 10002
=> #<Rivendell::API::Cut:0x000000025021f0 @name="010002_001", @cart_number="10002", @number=1, ...
@albanpeignier
albanpeignier / music.rb
Created September 17, 2012 06:47
Rivendell::Import (very first) preview
Rivendell::Import.config do |config|
config.to_prepare do |file|
cart.group = "MUSIC"
end
end
@albanpeignier
albanpeignier / create-carts.log
Created September 2, 2012 10:27
Rivendell batch creation
$ rivendell script examples/create-carts.rd
I, [2012-09-02T12:25:54.703958 #27563] INFO -- : Read carts-title.txt
I, [2012-09-02T12:25:54.704230 #27563] INFO -- : Create Cart Example 1
I, [2012-09-02T12:25:54.730254 #27563] INFO -- : Created Cart Example 1 with number 70013
I, [2012-09-02T12:25:54.730363 #27563] INFO -- : Create DropBox /nfs/dropboxes/emissions/example-1* with /nfs/dropboxes/log/example-1.log
I, [2012-09-02T12:25:54.736251 #27563] INFO -- : Create Cart Example 2
I, [2012-09-02T12:25:54.741059 #27563] INFO -- : Created Cart Example 2 with number 70014
I, [2012-09-02T12:25:54.741165 #27563] INFO -- : Create DropBox /nfs/dropboxes/emissions/example-2* with /nfs/dropboxes/log/example-2.log
I, [2012-09-02T12:25:54.744921 #27563] INFO -- : Create Cart Example 3
I, [2012-09-02T12:25:54.749394 #27563] INFO -- : Created Cart Example 3 with number 70015
@albanpeignier
albanpeignier / configure.log
Created May 24, 2012 13:22
Rivendell 2.1.4 configure sum-up
configure: "|-----------------------------------------------------|"
configure: "| *** RIVENDELL CONFIGURATION SUMMARY *** |"
configure: "|-----------------------------------------------------|"
configure: "| Configured Audio Drivers: |"
configure: "| Advanced Linux Sound Architecture (ALSA) ... Yes |"
configure: "| AudioScience HPI ... Yes |"
configure: "| JACK Audio Connection Kit ... Yes |"
configure: "| |"
configure: "| Audio Codecs: |"
configure: "| FLAC Encoding/Decoding Support ... Yes |"