Skip to content

Instantly share code, notes, and snippets.

View luizfernandonb's full-sized avatar

Luiz luizfernandonb

View GitHub Profile
@meylingtaing
meylingtaing / llist.c
Last active September 24, 2024 15:49
A generic linked list library for C
/* llist.c
* Generic Linked List implementation
*/
#include <stdlib.h>
#include <stdio.h>
#include "llist.h"
llist *llist_create(void *new_data)
{
@jonikarppinen
jonikarppinen / markdown-comments.md
Last active April 10, 2025 20:16
How to comment out stuff in Markdown on GitHub?

Comments in GitHub flavour of Markdown

As answers to this Stack Overflow question reveal, using <!--- and ---> or <!-- and --> works (view source by clicking "Raw"):

@kyle-ilantzis
kyle-ilantzis / open-w-atom.reg
Last active June 1, 2021 17:20
Adds 'Open in Atom' to context menu in Windows Explorer.
Windows Registry Editor Version 5.00
;
; Adds 'Open in Atom' to context menu (when you right click) in Windows Explorer.
;
; Based on https://github.com/Zren/atom-windows-context-menu. It didn't work
; https://github.com/Zren/atom-windows-context-menu/issues/1.
;
; Save this file to disk with a .reg extension. Replace C:\\Atom\\atom.exe with
; the path to the atom executable on your machine.
@fsmv
fsmv / miniupnpcTest.c
Created September 12, 2014 19:47
Miniupnpc Port Forwarding Example
#include <stdio.h>
#include <arpa/inet.h> //INET6_ADDRSTRLEN
#include <miniupnpc/miniupnpc.h>
#include <miniupnpc/upnpcommands.h>
int main(int argc, char *argv[]) {
int error = 0;
//get a list of upnp devices (asks on the broadcast address and returns the responses)
struct UPNPDev *upnp_dev = upnpDiscover(1000, //timeout in milliseconds
NULL, //multicast address, default = "239.255.255.250"
@alan-mushi
alan-mushi / json_parser.c
Last active April 2, 2025 07:28
Examples for the json-c tutorial.
/*
* A simple example of json string parsing with json-c.
*
* clang -Wall -g -I/usr/include/json-c/ -o json_parser json_parser.c -ljson-c
*/
#include <json.h>
#include <stdio.h>
int main() {
struct json_object *jobj;
@preshing
preshing / build_cross_gcc
Last active March 20, 2025 12:45
A shell script to download packages for, configure, build and install a GCC cross-compiler.
#! /bin/bash
set -e
trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
trap 'echo FAILED COMMAND: $previous_command' EXIT
#-------------------------------------------------------------------------------------------
# This script will download packages for, configure, build and install a GCC cross-compiler.
# Customize the variables (INSTALL_PATH, TARGET, etc.) to your liking before running.
# If you get an error and need to resume the script from some point in the middle,
# just delete/comment the preceding lines before running it again.
@roachhd
roachhd / README.md
Created December 8, 2014 23:09
Games on GitHub

Games on GitHub

Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.

Contributing

If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.

Help: MarkDown Help, Markdown Cheatsheet

@marcoscastro
marcoscastro / linked_list.c
Created December 20, 2014 14:55
Programação em C - Lista encadeada (linked list)
/*
Visite: www.GeeksBR.com
Programação em C - Lista encadeada (linked list)
Funcionalidades:
1) - Criar lista
2) - Adicionar na lista
3) - Listar os elementos da lista
4) - Verificar se a lista está vazia
5) - Buscar elemento na lista
6) - Remover elemento da lista
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@vielhuber
vielhuber / README.MD
Last active March 23, 2025 19:45
ffmpeg: Video convert m2ts to mp4, mp4 to webm, mp4 to ogv, mp3 wav hz, extract frames #tools

video convert m2ts to mp4, mp4 to webm, mp4 to ogv

mp4 to mp4 (medium)

ffmpeg -i input.mp4 -b 1000000 output.mp4

m2ts to mp4

ffmpeg -i input.m2ts -vcodec libx264 -crf 20 -acodec ac3 -vf "yadif" output.mp4