Skip to content

Instantly share code, notes, and snippets.

View AriaFallah's full-sized avatar
🤔
???

Aria Fallah AriaFallah

🤔
???
View GitHub Profile
@AriaFallah
AriaFallah / scrape.js
Last active September 19, 2022 02:15
Spanish Anki Deck Scraping Code
// https://www.spanish.academy/blog/1000-most-common-spanish-words-for-beginners/
function scrape() {
const words = [];
const parent = document.querySelectorAll(".blog_content")[0];
let currentSection = [null, null];
let currentSubsection = [null, null];
for (const child of parent.children) {
switch (child.tagName.toLowerCase()) {
@AriaFallah
AriaFallah / style.css
Created August 30, 2018 03:59
HN Stylus
body {
margin: 0;
font-size: 16px !important;
text-rendering: optimizeLegibility;
}
img[src="y18.gif"] {
margin-right: 5px;
}
open Js.String
module Ops = struct
type t =
| Delete of string * int
| Insert of string * string * int
| Replace of string * string * int
let run op = match op with
| Delete (str, i) ->
@AriaFallah
AriaFallah / sec.sh
Last active November 5, 2023 02:59
MacOS security CLI wrapper
#!/usr/bin/env bash
KEYCHAIN="secrets.keychain"
main () {
if [[ -z "$1" ]]; then
print_usage
fi
case "$1" in