Skip to content

Instantly share code, notes, and snippets.

View tsiura's full-sized avatar

Yevhenii Tsiura tsiura

View GitHub Profile
@tsiura
tsiura / stream_example.md
Created February 9, 2023 08:44 — forked from reinzor/stream_example.md
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

@tsiura
tsiura / stack.c
Created July 8, 2021 15:33 — forked from ArnonEilat/stack.c
Very simple stack implementation in C with usage example.
#include <stdio.h>
#include <stdlib.h>
#define FALSE 0
#define TRUE 1
typedef struct {
int info;
} DATA;
@tsiura
tsiura / CircularlyLinkedList.c
Created July 8, 2021 15:33 — forked from ArnonEilat/CircularlyLinkedList.c
Very simple circularly linked list implementation in C. Usage example included.
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int info;
} DATA;
typedef struct node {
DATA data;
struct node *next;
@tsiura
tsiura / linkedList.c
Created July 8, 2021 15:33 — forked from ArnonEilat/linkedList.c
Simple C implementation of linked list with pointer to the first node and pointer the last node. Usage example included.
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int info;
} DATA;
typedef struct node {
DATA data;
struct node * prev;
@tsiura
tsiura / queue.c
Created July 8, 2021 15:33 — forked from ArnonEilat/queue.c
Simple C implementation of queue. Usage example included.
#include <stdlib.h>
#include <stdio.h>
#define TRUE 1
#define FALSE 0
/* a link in the queue, holds the info and point to the next Node*/
typedef struct {
int info;
} DATA;
@tsiura
tsiura / singlyLinkedList.c
Created July 8, 2021 15:32 — forked from ArnonEilat/singlyLinkedList.c
Very simple singly linked list implementation in C with usage example.
#include <stdio.h>
#include <stdlib.h>
typedef struct {
int info;
} DATA;
typedef struct node {
DATA data;
struct node* next;
@tsiura
tsiura / dummy-converter.js
Created June 30, 2020 14:16 — forked from nurikk/dummy-converter.js
Example external converters
const zigbeeHerdsmanConverters = require('zigbee-herdsman-converters');
const getKey = (object, value) => {
for (const key in object) {
if (object[key] == value) return key;
}
};
const bind = async (endpoint, target, clusters) => {
for (const cluster of clusters) {
await endpoint.bind(cluster, target);
#include <SPI.h>
#define PIN_MOSI 11
#define PIN_MISO 12
#define PIN_SCK 13
#define PIN_SS_MRDY 10
#define PIN_SRDY 8
#define PIN_RES 7