Skip to content

Instantly share code, notes, and snippets.

View edoput's full-sized avatar

Edoardo Putti edoput

View GitHub Profile
@edoput
edoput / main.vala
Last active April 12, 2020 04:15
an approach to Gstreamer with Vala
using Gst;
public int main(string args[])
{
Gst.init(ref args);
Gst.Element screen = Gst.ElementFactory.make ("ximagesrc", "source");
Gst.Element color_convert = Gst.ElementFactory.make ("videoconvert", "convert");
Gst.Element encoder = Gst.ElementFactory.make ("x264enc","encoder");
Gst.Element flv_muxer = Gst.ElementFactory.make ("flvmux", "muxer");
@edoput
edoput / stirling.m
Last active November 29, 2016 20:17
% compute the n-th order stirling numbers
% of second species for n>= 2
%
% octave has a hard limit on recursion; 256 calls are the most
% you can make without raising an error
% set max_recursion_depth to your value
function x = stirling_recursive (n)
if (n == 2)
x =[1,1];
return;
{
"type": "DeviceConfiguration",
"general": {},
"interfaces": [
{
"type": "wireless",
"name": "wlan0",
"wireless": {
"radio": "ath0",
@edoput
edoput / correctness.v
Created June 14, 2019 10:03
Correctness of the type checker
Lemma correctness : (forall (gamma : environment) (t : term) (tt : type),
has_type gamma t tt -> (type_check gamma t) = Some({ tt | has_type gamma t tt})).
@edoput
edoput / remove-armv8.patch
Created May 9, 2020 17:39
This patch shows how to change a gcc profile to remove a target architecture
remove armv8 from starlight multilib
---
--- a/gcc/config/arm/t-rmprofile
+++ b/gcc/config/arm/t-rmprofile
@@ -27,15 +27,13 @@
# Arch and FPU variants to build libraries with
@edoput
edoput / data.py
Created August 10, 2020 08:23
example of modules and scripting
# this part is executed when you load it
a = 0
while a < 10:
a++
# now we could have executed whatever here, read a file
# reboot the system, not so nice and the reason you
# should read a dependency to make sure you are not
# going to kill yourself