Skip to content

Instantly share code, notes, and snippets.

View Killaship's full-sized avatar

William Killaship

View GitHub Profile
@Killaship
Killaship / main.c
Created November 14, 2022 03:31
mac-vm
/*
Killaship
2022
November 13th, ~10:30 PM EST
This took like an hour or two to make, WITH a tutorial and previous experience!
A VM following the specifications of the 'mac' architecture, as outlined in this blog:
https://felix.engineer/blogs/virtual-machine-in-c/
I was pretty tired while writing this, so the code might suck.
Hell, I typed & instead of % twice and was wondering for minutes about it!
I started work on this at ~ 9:15, I recorded the progress.
@Killaship
Killaship / brainfuck.c
Created October 2, 2022 15:22
I have no idea why it's broken
// Copyright Killaship (C) 2022
// Informally, this is under the MIT licence, where basically you can do whatever, just give me credit.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PROG_SIZE 30000
unsigned char dcells[30000];
unsigned char program[PROG_SIZE];
int data = 0;
int instr = 0;
#pragma once
#include<iostream>
#include<vector>
#include<stack>
class Interpreter
{
public:
static void Run(std::string input)
@Killaship
Killaship / dump.asm
Last active September 5, 2021 14:34
Dump Registers in A boot sector
; https://github.com/appusajeev/os-dev-16/blob/master/reg.asm
; This code is a slightly modified version of the above.
; This code dumps the registers in a single boot sector.
; Compile and run with the 2 following commands:
; nasm -f bin dump.asm -o dump
; qemu-system-i386 -fda dump
; You can also do it without -fda if you hate floppy disks for some reason.
// This post referred to this git. I just trimmed cam and wifi part.
// https://github.com/v12345vtm/CameraWebserver2SD/blob/master/CameraWebserver2SD/CameraWebserver2SD.ino
#include "FS.h"
#include "SD_MMC.h"
//List dir in SD card
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
Serial.printf("Listing directory: %s\n", dirname);
@ummjackson
ummjackson / killabot.py
Created May 4, 2018 08:05
killabot v1 (wip)
# Requirements: pip install tweepy fuzzywuzzy python-Levenshtein
import tweepy
import re
from fuzzywuzzy import fuzz
# Credentials go here (generate at: https://apps.twitter.com)
auth = tweepy.OAuthHandler('consumer_key', 'consumer_secret')
auth.set_access_token('access_token', 'access_token_secret')
# Connect to Twitter
@rfong
rfong / I2C_SSD1306_ipaddr.py
Last active April 4, 2024 02:09
Display my IP address on an I2C OLED screen #raspberrypi #gpio
""" Display my IP address on an I2C OLED screen connected over GPIO """
import socket
import time
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
import Adafruit_GPIO.SPI as SPI
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active May 23, 2024 16:31 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 21, 2024 15:55
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@Protoneer
Protoneer / SerialEcho
Created September 18, 2014 18:51
Serial Echo On Arduino
/*
* serial_echo.pde
* -----------------
* Echoes what is sent back through the serial port.
*
* http://spacetinkerer.blogspot.com
*/
int incomingByte = 0; // for incoming serial data