Skip to content

Instantly share code, notes, and snippets.

View mhofwell's full-sized avatar
🐢

Michael Hofweller mhofwell

🐢
View GitHub Profile
@mhofwell
mhofwell / dna.py
Created November 20, 2020 19:03
parses DNA threads
import re
import math
import csv
from utils import sanitize
from sys import argv, exit
countStrand1 = 0
countStrand2 = 0
countStrand3 = 0
countStrand4 = 0
@mhofwell
mhofwell / dictionary.c
Created November 17, 2020 22:47
Spell Checker in C: Hash table, Linked Lists, Memory Allocation.
// Implements a dictionary's functionality
#include <stdbool.h>
#include "dictionary.h"
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdint.h>
@mhofwell
mhofwell / bmp.h
Last active November 14, 2023 14:09
Applying Filters by Manipulating Pixel Values!
// BMP-related data types based on Microsoft's own
#include <stdint.h>
/**
* Common Data Types
*
* The data types in this section are essentially aliases for C/C++
* primitive data types.
*
@mhofwell
mhofwell / recover.c
Last active September 28, 2023 10:04
JPEG Recovery from Memory in C
// Recovers JPEGs from a .raw file by searching for JPEG headers and writing all of the bytes
// between headers to different out files.
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <ctype.h>
#include <stdint.h>
@mhofwell
mhofwell / caesar.c
Last active October 24, 2020 18:15
Shift Cipher String Encryption in C!
// this program is run on the command line. Fist compile the program with clang or C compiler.
// then run ./<program name> <key>
// the key is a numerical value greater or equal to zero and is required.
// The program will then ask you for a plaintext message to encrypt using your key.
// The program returns ciphertext.
#include <stdio.h>
#include <cs50.h>
#include <string.h>
@mhofwell
mhofwell / juggling-async.js
Last active November 7, 2020 23:56
Async Request Handling in Node with Counting Callbacks
// this node program takes 3 URLs provided by the first 3 command line arguments and gets some data from those URLS.
// the program then prints each set of data in the order it was called.
// counting callbacks was a requirement as a method to handle the asyncronicity.
const http = require('http');
const urls = [];
const dataArr = [];
let count = 0;