Skip to content

Instantly share code, notes, and snippets.

View uidops's full-sized avatar
☄️
_-_-_-_- ^ -_-_-_-_

joe uidops

☄️
_-_-_-_- ^ -_-_-_-_
View GitHub Profile
#include <iostream>
using namespace std;
enum ShapeColor
{
BLACK, // = 0
WHITE,
GREEN,
BLUE,
@uidops
uidops / project.sql
Created April 20, 2025 10:36
School Database project
CREATE TABLE "Documents"(
"DID" integer NOT NULL,
"Type" varchar(10) NOT NULL,
"Category" varchar(10) NOT NULL,
"IssueDate" date NOT NULL,
"ExpireDate" date NOT NULL,
"Identificator" varchar(20) NOT NULL,
"Number" varchar(20) NOT NULL,
PRIMARY KEY("DID")
);
@uidops
uidops / bisection.m
Last active April 11, 2025 16:40
Numerical methods for finding root in MATLAB
syms x
f(x) = x + sin(x) - 1;
a = -0.5;
b = 0.6;
x = 0;
precision = 0.01;
# d = [(5, 2), (2, 3), (3, 4), (4, 6)]
d = [5, 2, 3, 4, 6]
# d0, d1, d2, d3, d4
n = len(d) - 1 # number of matrices
matrix = [[0 for j in range(n)] for i in range(n)]
# create a n*n matrix and fill with zero
for j in range(n):
i = 0
@uidops
uidops / nl80211.c
Created March 24, 2024 16:31
nl80211 netlink in c
#include <linux/netlink.h>
#include <linux/genetlink.h>
#include <linux/nl80211.h>
#include <sys/socket.h>
#include <net/if.h>
#include <err.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@uidops
uidops / rtnl_link_stats.go
Created March 23, 2024 12:30
rtnl_link_stats linux netlink in go
@uidops
uidops / homo_group.v
Last active October 28, 2023 20:19
group homomorphism
From Coq Require Import Setoids.Setoid.
Parameter G: Set.
Parameter H: Set.
Parameter opG: G -> G -> G.
Parameter opH: H -> H -> H.
Parameter eG: G.
Parameter eH: H.
Parameter iG: G -> G.
Parameter iH: H -> H.
Inductive bin : Type :=
| Z
| B0 (b: bin)
| B1 (b: bin).
Lemma add_0_r : forall (n: nat),
n + 0 = n.
Proof.
intros n. induction n as [| n' IHn'].
- reflexivity.
@uidops
uidops / .config
Created July 9, 2023 08:43
LINUX .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.4.2-gentoo Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="clang version 16.0.6"
CONFIG_GCC_VERSION=0
CONFIG_CC_IS_CLANG=y
CONFIG_CLANG_VERSION=160006
CONFIG_AS_IS_LLVM=y
CONFIG_AS_VERSION=160006
#include <libnotify/notify.h>
#include <sys/param.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>