Skip to content

Instantly share code, notes, and snippets.

View rebeccajae's full-sized avatar
🚀
🐈

rebeccajae rebeccajae

🚀
🐈
View GitHub Profile
@rebeccajae
rebeccajae / pasteonce.lua
Created April 29, 2021 19:29
Create a cmd-opt-v hotkey that pastes once, clearing the clipboard simultaneously.
hs.hotkey.bind({"cmd", "alt"}, "V", function()
local pasteContent = hs.pasteboard.getContents()
hs.pasteboard.clearContents()
hs.eventtap.keyStrokes(pasteContent)
end)
-- # setup
create extension "uuid-ossp";
-- # users
create table users (
id serial not null constraint users_pk primary key,
username varchar(255) not null,
password bytea not null
);
@rebeccajae
rebeccajae / main.go
Created August 3, 2020 21:51
what the fuck
package main
import (
"fmt"
"io/ioutil"
"os"
"regexp"
)
func main() {
@rebeccajae
rebeccajae / code-test.html
Created June 28, 2020 17:02
Selections are hard.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
body {
font-family: Arial, Helvetica, sans-serif;
}
.container {
@rebeccajae
rebeccajae / README.md
Last active April 11, 2020 06:44
take a jsonified iterm color scheme and convert it to a binja colors table

iTerm2Binja Color Scheme Thing

Requirements

plist2json

babashka

Usage

cat your.itermcolors | plist2json | bb -i -o -f convert.clj

@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())
@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 / 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 / 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

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