Skip to content

Instantly share code, notes, and snippets.

@kyv
kyv / news.js
Created Feb 4, 2018
news actuator
View news.js
import { sampleSize, difference } from 'lodash';
import { parseString } from 'xml2js';
import {
HTTP,
} from 'meteor/http';
const rssUrl = 'https://www.rindecuentas.org/tag/torre-de-control/feed/';
function nameToLowerCase(name){
return name.toLowerCase();
@kyv
kyv / opusRtp.c
Created Jan 8, 2018
empeded opus rtp stream
View opusRtp.c
/* opusStream
* Copyright (C) 2009 Kevin Brown <kevin@ki-ai.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@kyv
kyv / keybase.md
Created Nov 20, 2017
keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am kyv on github.
  • I am tbro (https://keybase.io/tbro) on keybase.
  • I have a public key ASDBSQkbo4S8ZV4q9EP-gEO8G5ChtSNab1fQ7lKj0AB_wQo

To claim this, I am signing this object:

@kyv
kyv / namespaces.diff
Last active Jun 8, 2017
patch for using namespaces with git-mediawiki
View namespaces.diff
From 147224cfe6143c44b16aec0bb6d6a506a6b96ced Mon Sep 17 00:00:00 2001
From: Kevin <kevin@ki-ai.org>
Date: Fri, 28 Aug 2015 15:53:37 -0500
Subject: [PATCH] Add namespace support to git-mediawiki
Signed-off-by: Kevin <kevin@ki-ai.org>
---
contrib/mw-to-git/git-remote-mediawiki.perl | 34 +++++++++++++++++++++++++++--
1 file changed, 32 insertions(+), 2 deletions(-)
@kyv
kyv / diff-commits.js
Last active Aug 29, 2015
diff-commits with lodash
View diff-commits.js
var _ = require("lodash");
var nodegit = require("nodegit");
var path = require("path");
// This code examines the diffs between a particular commit and all of its
// parents. Since this commit is not a merge, it only has one parent. This is
// similar to doing `git show`.
nodegit.Repository.open(path.resolve(__dirname, "./"))
.then(function(repo) {
@kyv
kyv / file2icecast
Created Oct 3, 2014
stream local video file to icecast in webm format
View file2icecast
gst-launch-0.10 -e filesrc location=VideoFile.avi ! decodebin name=demux ! queue ! ffmpegcolorspace ! vp8enc ! webmmux name=mux streamable=true ! shout2send ip=127.0.0.1 port=8000 mount=montaje.webm password=hackme demux. ! queue ! progressreport ! audioconvert ! audioresample ! vorbisenc ! mux
@kyv
kyv / pls2ice
Created Sep 28, 2014
liquidSoapPlaylistToIcecast
View pls2ice
#!/usr/bin/liquidsoap
set("log.file.path","./video.log")
set("frame.video.width", 320)
set("frame.video.height",240)
set("frame.video.samplerate",12)
# Videos
list = playlist("~/Downloads/Firefly/list.m3u")
View mixit.py
from gi.repository import GstPbutils
from gi.repository import Gtk
from gi.repository import Gst
from gi.repository import GES
from gi.repository import GObject
import sys
import signal
def handle_sigint(sig, frame):
@kyv
kyv / dvswitchBuildError9
Created Sep 27, 2014
dvswitch 0.9.1-1 build failure on archlinux
View dvswitchBuildError9
/home/kevin/proyectos/dvswitch/src/dvswitch/src/tally_rtsp_server.cpp: En el constructor ‘tally_rtsp_server::RTSPClientSession::RTSPClientSession(tally_rtsp_server&, unsigned int, int, sockaddr_in)’:
/home/kevin/proyectos/dvswitch/src/dvswitch/src/tally_rtsp_server.cpp:60:103: error: no se encontró una función coincidente para la llamada a ‘RTSPServer::RTSPClientSession::RTSPClientSession(tally_rtsp_server&, unsigned int&, int&, sockaddr_in&)’
: RTSPServer::RTSPClientSession(ourServer, sessionId, clientSocket, clientAddr), server_(ourServer)
^
/home/kevin/proyectos/dvswitch/src/dvswitch/src/tally_rtsp_server.cpp:60:103: nota: los candidatos son:
In file included from /home/kevin/proyectos/dvswitch/src/dvswitch/src/tally_rtsp_server.hpp:9:0,
from /home/kevin/proyectos/dvswitch/src/dvswitch/src/tally_rtsp_server.cpp:5:
/usr/include/liveMedia/RTSPServer.hh:271:5: nota: RTSPServer::RTSPClie
@kyv
kyv / dvswitchBuildError
Created Sep 27, 2014
dvswitch 0.8.3.6 build failure on archlinux
View dvswitchBuildError
In file included from /home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/dv_display_widget.hpp:13:0,
from /home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/mixer_window.hpp:21,
from /home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/dvswitch.cpp:20:
/home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/auto_codec.hpp:22:36: error: ‘CodecID’ no se declaró en este ámbito
auto_codec auto_codec_open_decoder(CodecID);
^
/home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/auto_codec.hpp:23:50: error: ‘CodecID’ no se ha declarado
void auto_codec_open_decoder(const auto_codec &, CodecID);
^
/home/kevin/proyectos/dvswitch/src/dvswitch-0.8.3.6/src/auto_codec.hpp:23:57: error: ‘void auto_codec_open_decoder(const auto_codec&, int)’ redeclarado como un tipo diferente de símbolo