Skip to content

Instantly share code, notes, and snippets.

View rebeccajae's full-sized avatar
🚀
🐈

rebeccajae rebeccajae

🚀
🐈
View GitHub Profile
@rebeccajae
rebeccajae / lab3a.c
Last active February 20, 2018 23:21
ECE 426 Lab 3
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main()
{
int n = 8; //35
pid_t pid;
pid = fork();
@rebeccajae
rebeccajae / lab4a.c
Last active March 1, 2018 20:51
ECE426 Lab4
#include <pthread.h>
#include <stdio.h>
#define NTHREADS 10
void *sum_runner(void *param);
int sum;
int main(int arc, char *argv[])
@rebeccajae
rebeccajae / kern_print.asm
Last active May 30, 2018 04:19
Simple string printer in x86 ASM.
global start
section .text
bits 32
string_start:
dw 0x2f33, 0x2f32, 0x2f4f, 0x2f4b, 0x0
start:
mov esp, stack_top
@rebeccajae
rebeccajae / rootPitch.m
Last active March 23, 2018 07:16
Crude thing
function p = rootPitch(key, note)
notes = {'c', 'cs', 'd', 'ef', 'e', 'f', 'fs','g','gs','a','bf', 'b'};
I = find(strcmp(notes, note));
I = I-1;
shift = 12*key;
idx = shift + I;
a = 2^(1/12);
f0 = 16.35;
p = f0*a^idx;
end
@rebeccajae
rebeccajae / keybase.md
Created September 27, 2018 20:01
A thing.

Keybase proof

I hereby claim:

  • I am rebeccajae on github.
  • I am rebeccajae (https://keybase.io/rebeccajae) on keybase.
  • I have a public key ASADKqSwYD57WMewaRqh43Eh2lVEmZLM5s8oFEAMfmJptgo

To claim this, I am signing this object:

import random
def solution(N, L):
#Given budget of integer N, and a list of items of length S
#each with their own cost C, return the sub-list that uses
#the highest value <=N.
res = (0, 0, 0)
for idx, item in enumerate(L):
i = 0
l = 0
@rebeccajae
rebeccajae / postmail.md
Last active January 30, 2019 05:12
PostMail Spec?

The PostMail Protocol Thing

PostMail is an HTTP-based email protocol I'm implementing because I'm sick of how stuck in the 90s email servers feel. I use HTTP POST and a little bit of DNS shenanigans to get compatibility and am working on a demo.

The Configuration

Any domain has a DNS record, a TXT record called POSTMAIL if PostMail is supposed to be supported. It should be set to the prefix of the current domain.

For example, example.com is configured to receive PostMail at postmail-sys.example.com. The TXT record should be set to postmail-sys

@rebeccajae
rebeccajae / porter.py
Created May 30, 2019 20:32
XFCE to Tilix Theme Porter
import configparser
import json
import sys
config = configparser.ConfigParser()
config.read(sys.argv[1])
output = {}
output['name'] = config['Scheme']['Name']
output['comment'] = "Ported by ThemePorter"
output['use-theme-colors'] = False
output['foreground-color'] = config['Scheme']['ColorForeground']
@rebeccajae
rebeccajae / gcal_notif.js
Last active June 6, 2019 03:32
Jankily adds gcal notifications to webapp.
// ==UserScript==
// @name Google Calendar Desktop Notifications
// @namespace https://www.rebeccapruim.com/
// @version 0.1
// @description Provides desktop notification support for Google Calendar's webapp.
// @match https://calendar.google.com/*
// @copyright 2019+, Rebecca J. Pruim
// @grant unsafeWindow
// ==/UserScript==
@rebeccajae
rebeccajae / fullida64.py
Last active January 16, 2020 21:43
IDA64 on MacOS uses symlinks to keep it small, and that doesn't play well with new OS behavior. This will copy those files into the .app so it runs directly.
# SPDX-License-Identifier: Apache-2.0
import subprocess
from pathlib import Path
import shutil
import os
linksInIDA64 = subprocess.run(['find', 'ida64.app', '-type', 'l'], stdout=subprocess.PIPE)
for path in linksInIDA64.stdout.splitlines():
thisPath = Path(path.decode("utf-8"))
symlinkAt = str(thisPath.absolute())