Skip to content

Instantly share code, notes, and snippets.

@fernandoc1
fernandoc1 / Makefile
Created June 13, 2016 18:11
A test encoder with libavcodec
all:
g++ main.cpp -lavcodec -lavutil-ffmpeg -o TestEncoder
@fernandoc1
fernandoc1 / avconv_video_maker.cpp
Created June 20, 2016 12:59
A class for creating videos with avconv
extern "C" {
#include <libavcodec/avcodec.h>
#include <libavutil/mathematics.h>
}
class AVConvVideoMaker
{
AVCodec* codec;
AVCodecContext* context;
AVFrame* picture;
@fernandoc1
fernandoc1 / drawing.svg
Created July 4, 2016 19:13
Drawing SVG with Image Magick, Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fernandoc1
fernandoc1 / marker.py
Created July 6, 2016 14:00
Creating colorful Google Markers with python for using in CGI.
#! /usr/bin/python
from xml.dom import minidom
import os
import sys
import cairo
import rsvg
markerDocument = minidom.parse('marker.svg')
@fernandoc1
fernandoc1 / Makefile
Created July 12, 2016 13:14
Testing OpenCV's OpenCL module
all:
g++ main.cpp -lopencv_core -lopencv_ocl
@fernandoc1
fernandoc1 / bar_chart.html
Created July 13, 2016 17:08
A simple bar chart code for the web.
<html>
<body>
<style>
#chartDiv
{
width: 50%;
height: 200px;
}
.chartBar
@fernandoc1
fernandoc1 / barchart.html
Created July 17, 2016 03:20
A Simple HTML bar chart plotter
<html>
<body>
<style>
#chartDiv
{
width: 50%;
height: 200px;
}
.chartBar
@fernandoc1
fernandoc1 / Makefile
Created July 20, 2016 12:20
Modbus libmodbus simple test
all:
g++ main.cpp -lmodbus
@fernandoc1
fernandoc1 / main.cpp
Created July 20, 2016 21:20
modbus server with bit pooling.
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <modbus/modbus.h>
#include <iostream>
#include <thread>
#include <mutex>
#include <chrono>
@fernandoc1
fernandoc1 / Run.sh
Created November 17, 2016 15:59
Getting environment variable from script
#! /bin/bash
export RUN_FROM_SCRIPT=1
./a.out