Skip to content

Instantly share code, notes, and snippets.

View harieamjari's full-sized avatar

Al-buharie harieamjari

View GitHub Profile
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <fftw3.h>
#define FPS 24
#define VID_TIME 10
@harieamjari
harieamjari / string_vibrate.c
Last active August 13, 2020 15:26
To model a vibrating string using gnuplot and then ffmpeg.
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#define TIME_OF_VIDEO (uint32_t) 10
#define LENGTH_OF_STRING (uint32_t) 3
#define SAMPLE_PER_LENGTH (uint32_t) 50
#define FPS (uint32_t) 30
#define FREQUENCY (uint32_t) 1
@harieamjari
harieamjari / dft_wav.c
Last active July 1, 2023 17:14
Fourier transform a wav file.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <fftw3.h>
typedef struct __attribute__((__packed__)) {
char ChunkID[4];
uint32_t ChunkSize;
@harieamjari
harieamjari / write_bmp.c
Last active June 10, 2020 06:52
A simple bmp writer in C using the standard library. This renders a 24-bit image of color red, green, and blue, from bottom to top, respectively.
/*
DO WHAT THE FUCK YOU WANT TO BUT IT'S NOT MY FAULT PUBLIC LICENSE
Version 1, October 2013
Copyright (c) 2020 Al-buharie Amjari <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified copies
of this license document, and changing it is allowed as long as the name
is changed.
@harieamjari
harieamjari / sha-ttered.py
Created May 4, 2019 11:02
A python script that tries to crack hash
import hashlib
import string
import sys
hash_name = 'd5787cd36cdf96b5ff9edcfb2461e092a9cbe6e0e15474464346950a5c6b5616'
# random_list = ['a', 'b', 'c', 'd']
random_list = list(string.ascii_lowercase)
length = len(random_list)
lens = 0
print("\nSHA-256")