Skip to content

Instantly share code, notes, and snippets.

View frednora's full-sized avatar
💎

Fred Nora frednora

💎
View GitHub Profile
/********************
* Exemplo maluco por Luiz Felipe.
*
* https://github.com/Silva97
********************/
#include <stdio.h>
#define UCHARPTR (unsigned char *)
/********************
* Exemplo de replace em C.
* Por Luiz Felipe.
* https://github.com/Silva97
********************/
#include <stdio.h>
#include <string.h>
int replace(char *text, char *word, char *new);
@Silva97
Silva97 / lscanf.c
Last active November 3, 2022 13:35
Maneira segura de pegar o input do usuário
/********************
* Developed by Luiz Felipe.
*
* GitHub: https://github.com/Silva97
* Facebook: https://www.facebook.com/B4.0E.B0.48.CD.10.B0.69.CD.10.C3
********************/
#include <stdio.h>
#include <stdarg.h>
#include <limits.h>
@LucGoncalez
LucGoncalez / mouse-stuff.c
Last active January 2, 2018 12:24
Mouse Stuff
/*
* **************************************************
* mouseHandler:
* Handler de mouse.
*
* *Importante:
* Se estamos aqui é porque os dados disponíveis no controlador 8042
* pertencem ao mouse.
* @todo: Essa rotina não pertence ao line discipline.
*
@nelsoncole
nelsoncole / mouse.c
Last active January 1, 2018 13:07
Teste de PS/2 mouse (Borland C++ 3.1 - MS-DOS)
/* C¢digo para o Borland C++ 3.1.
coloquei delays de 1us entre escritas/leituras para o KBDC.
coloquei verificação de acknowledge depois de mouse_writes.
Ainda travando
OK! Tio Fred estamos lidando com dispositivos seriais, na verade dois dispositivos partilhando o mesmo Chip,
sabes o aquão trasçueiros eles são.
@frednora
frednora / test
Last active July 29, 2018 20:46
Test
int main (){
//This is a test.
return (int) 0;
};
@ty60
ty60 / test_udp.c
Last active March 4, 2025 09:31
C program to send raw UDP packet
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdint.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <linux/if_ether.h>
#include <arpa/inet.h>
@laobubu
laobubu / ABOUT.md
Last active March 12, 2025 21:04
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@tautologico
tautologico / tabver.c
Last active November 24, 2018 01:05
// Calculo de tabela verdade para formulas representadas
// com arvores sintaticas.
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
// macro para calcular o valor da implicacao
@pmachapman
pmachapman / tinybasic.c
Created March 23, 2016 09:54
A tiny BASIC Interpreter
/* A tiny BASIC interpreter */
#include <string.h>
#include <stdio.h>
#include <setjmp.h>
#include <math.h>
#include <ctype.h>
#include <stdlib.h>
#define NUM_LAB 100