Skip to content

Instantly share code, notes, and snippets.

View karchx's full-sized avatar
need more coffee

Стив karchx

need more coffee
View GitHub Profile
ast.exe: ast.c
gcc -Werror -Wswitch -Wimplicit-fallthrough ast.c -o ast.exe
clean:
rm -f *.o *.exe *.s a.out
test.s: ast.exe
./ast.exe > test.s
# Select the i2c bus
i2c dev <bus>
i2c dev 0
# Probe the device
i2c probe <chip>
i2c probe 0x60
# Read from the device
i2c read <chip> <chip address> <length> <memory address>
@artisdom
artisdom / Timer.cpp
Created February 16, 2022 09:30 — forked from mcleary/Timer.cpp
C++ Timer using std::chrono
#include <iostream>
#include <chrono>
#include <ctime>
#include <cmath>
class Timer
{
public:
void start()
{
@sxiii
sxiii / install-anydesk-arch.md
Last active February 26, 2025 19:47
How to install AnyDesk on ArchLinux / Manjaro / Garuda so somebody can help you fix or configure it

How to install AnyDesk on ArchLinux / Manjaro / Garuda so somebody can help you fix or configure it


sudo pacman -Sy
sudo pacman -S glibc lib32-glibc
sudo pacman -S yay
yay -S anydesk-bin

#!/usr/bin/env python3
import random
cs = "BCDFGHJKLMNPQRSTVWXZY"
vs = "AEIOU"
def generate_name(n=3):
result = ""
for i in range(n):
@rzavalet
rzavalet / hash.c
Created July 10, 2016 21:47
Implementación de una Hash Table sencilla
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#define ELEM_HASH 100
/* Esta es nuestra estructura que representa
* a una hash table */
typedef struct HashTable {
int num_elements; /* Número de elementos que podemos almacenar */