Skip to content

Instantly share code, notes, and snippets.

View rebeccajae's full-sized avatar
🚀

rebeccajae rebeccajae

🚀
View GitHub Profile
@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 / 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 / main.go
Created August 3, 2020 21:51
what the fuck
package main
import (
"fmt"
"io/ioutil"
"os"
"regexp"
)
func main() {
-- # 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 / 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)
import torch
def main():
if not torch.backends.mps.is_available():
print("MPS not available")
return
large_weight = torch.randn(12, 8, device='mps')
weight_sliced = large_weight[::2, ::1]
weight_contiguous_equiv = weight_sliced.contiguous()