Skip to content

Instantly share code, notes, and snippets.

@kyv
kyv / photos_tag.rb
Last active January 12, 2021 21:10 — forked from sukima/photos_tag.rb
Gallery Tag for Jekyll/Octopress Using extended version of bootstrap carousel
# Title: Gallery Tag for Jekyll
# Authors: Kevin Brown
# Description: gallery using extended bootstrap carousel. Uses a CDN if needed.
#
# Adaption of "Photos tag for Jekyll" by Devin Weaver
# Using bootstrap carosel-extended instead of fancybox: "http://bootsnipp.com/snipps/carousel-extended"
# We have also left out the photo tag and are using solly the gallery function
#
# ** This only covers the markup. Not the integration of carousel-extended **
#
@kyv
kyv / news.js
Created February 4, 2018 21:23
news actuator
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 January 8, 2018 04:26
empeded opus rtp stream
/* 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 November 20, 2017 22:37
keybase proof

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 June 8, 2017 20:52
patch for using namespaces with git-mediawiki
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 / wavecmp
Created June 19, 2013 14:37
Compare wave files in two folders for length. Shows which files in second folder are closest to the length of files in first folder
#!/usr/bin/env python2
import os, sys
import contextlib
import wave
def main():
folders = []
dir1, dir2 = parseArgs(sys.argv)
print dir1, dir2
@kyv
kyv / mpdsched
Last active December 18, 2015 00:19
Simple script in ruby which schedules genres of musica by hour. Personally I call it with mpdcron.
#!/usr/bin/env ruby
require 'ruby-mpd'
mpd = MPD.new
mpd.connect
sched = ['Jazz', 'Jazz', 'Classical', 'Classical', 'Country', 'Blues', 'Son Jarocho', 'Jazz', 'Classical', 'Classical', 'Country', 'Blues', 'Jazz', 'Soul', 'R&B', 'R&B', 'Chilena', 'African', 'Afrobeat', 'Cumbia', 'Salsa', 'Tropical', 'Salsa' ,'Classical'] # 0-24
# make list of filenames w/out extension
@kyv
kyv / images-tags
Created March 14, 2013 15:42
cakecd tags plugin pagination
#Model/Image.php
...
public $actsAs = array('Tags.Taggable',
'Containable',
);
...
#Controller/ImagesController.php
...
class ImagesController extends AppController {
@kyv
kyv / gist:3978602
Created October 30, 2012 06:20
intro fit the second
NARRARADOR
Profundamente lejos en los remanos inexplorados del espiral pasado del moda del Oeste de la Galaxia esta un desatendido sol amarillo. Orbitando a ello a una distancia de mas o menos cincuenta millones de kilómetros es un pequeño y completamente insignificante planeta de azul-verde cuyos simio-descendiente formas de vida son tan increíblemente primitivos que aun piensan que relojes digitales son una idea genial.
Este planeta tiene, o tenia, un problema - lo cual era lo siguiente: la mayoría de las personas viviendo en ello estaban infelices el mayor parte del tiempo. Muchos soluciones fueran surgidos para resolver la problema, pero la mayoría de ellos preocupaban principalmente por el movimiento de pequeños verdes piezas de papel, lo cual es un poco extraño debido al hecho que por lo general no eran los pequeños verdes piezas de papel que estaban infelices.
Entonces la problema continuaba; y muchos personas eran muy bajos, y la mayoría eran miserables, inclusive los con relojes digitales. Much
@kyv
kyv / cpls.pl
Created October 6, 2012 17:57
copy y convert music for mp3 player
#!/usr/bin/perl
#Copyright 2012, kev@flujos.org
# * Licensed under the GPL Version 2 license.
use File::Copy;
use File::Basename;
my $PLS="$ARGV[0]";
my $DEST="$ARGV[1]";
my $tmp='/tmp/out.wav';
my @exts=qw(.ogg .oga .wma .m4a);
open($p, $PLS);