Skip to content

Instantly share code, notes, and snippets.

@DavidValin
DavidValin / sh
Last active April 29, 2026 03:48
voice_debate_from_youtube_video.sh
#!/bin/bash
# This program creates voice debate between 2 information analysts from a youtube video
# and saves the debate in ~/.vtmate/conversations folder as audio+text files
# How to run it
# -------------------------------------------------------------------------------------
#
# chmod +x ./voice_debate_from_youtube_video.sh
# ./voice_debate_from_youtube_video.sh <YOUTUBE_VIDEO_ID> <LANGUAGE>
@DavidValin
DavidValin / graph_fsm.erl
Created April 4, 2018 12:44 — forked from erszcz/graph_fsm.erl
Vance Shipley's graph_fsm - a tool for drawing Erlang gen_fsm diagrams (http://www1.erlang.org/pipermail/erlang-questions/2001-October/003716.html)
%% graph_fsm.erl
%%
%% Author: Vance Shipley, Motivity Telecom Inc. <vances@motivity.ca>
%% Date: November, 2000
%%
%%
%% This library is free software; you can redistribute it and/or
%% modify it under the terms of the GNU Lesser General Public
%% License as published by the Free Software Foundation; either
%% version 2 of the License, or (at your option) any later
@DavidValin
DavidValin / adhearsion_outgoing_call.rake
Created April 3, 2018 23:41 — forked from cloudvoxcode/adhearsion_outgoing_call.rake
place & receive a phone call with Ruby (Adhearsion)
require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
require 'adhearsion'
require 'adhearsion/initializer/asterisk'
require 'drb'
# http://help.cloudvox.com/faqs/getting-started/setup-for-ruby-adhearsion
desc "Make an outgoing phone call to number provided as 'call' (via Cloudvox)"
task :make_outgoing_call do
if ENV['call']
# Outgoing context from Cloudvox Switchboard, under "Outgoing settings (AMI)."
@DavidValin
DavidValin / libwebsockets-webserver.c
Created June 23, 2016 21:47 — forked from martinsik/libwebsockets-webserver.c
Simple webserver based on libwebsockets library. Read full description at http://martinsikora.com/libwebsockets-simple-http-server
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libwebsockets.h>
static int callback_http(struct libwebsocket_context *context,
struct libwebsocket *wsi,
enum libwebsocket_callback_reasons reason, void *user,