Skip to content

Instantly share code, notes, and snippets.

View ericek111's full-sized avatar

Erik Bročko ericek111

View GitHub Profile
@ericek111
ericek111 / linked_list.c
Last active March 12, 2018 12:52
[C] Double linked list
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Linked list entry */
typedef struct llEntry {
struct llEntry* prev;
struct llEntry* next;
void* data;
} llEntry;
@ericek111
ericek111 / median.c
Last active November 13, 2017 14:34
Find average of random numbers in array
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int find_median(int* arr, size_t count);
size_t median_count(int* arr, size_t count, int median);
int find_median(int* arr, size_t count) {
int sum = 0;
@ericek111
ericek111 / record.sh
Last active September 12, 2017 21:00
LiveATC archive
#!/bin/bash
# https://gist.github.com/ericek111/7463aa1c2367683e51578789767a583a
# Check if SOX is installed
if ! hash "${SOX:-sox}" 2>/dev/null; then
echo "ERROR: SOX was not found in path ${SOX:-sox}"
echo "Run: sudo apt-get install sox libsox-fmt-mp3"
exit 1
fi
@ericek111
ericek111 / xoverlay.cpp
Last active May 17, 2024 21:59
X11 overlay
/*
* Copyright (c) 2020 ericek111 <erik.brocko@letemsvetemapplem.eu>.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU