Skip to content

Instantly share code, notes, and snippets.

View ynx0's full-sized avatar
🥊
locked and loaded

Yaseen ynx0

🥊
locked and loaded
View GitHub Profile
@ynx0
ynx0 / pandoc.css
Created September 6, 2023 01:17 — forked from killercup/pandoc.css
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@ynx0
ynx0 / Cairo Notes.md
Last active April 22, 2022 21:54
abbreviated notes about cairo. like a "crash course" or smtn
@ynx0
ynx0 / advent-get.hoon
Last active December 3, 2021 01:26
Get your AoC inputs straight from the dojo!
/- spider
/+ strandio
=, strand=strand:spider
^- thread:spider
|= arg=vase
:: adapted from https://urbit.org/docs/arvo/iris/example (thanks ~tinnus-napbus!)
=/ m (strand ,vase)
^- form:m
=/ day (need !<([(unit @ud)] arg))
;< =bowl:spider bind:m get-bowl:strandio
@ynx0
ynx0 / update_binary.sh
Last active January 18, 2022 02:18
updates the binary in place! make sure you back up your vere folder cause this guy deletes it
#!/usr/bin/env bash
BINARY_HOME="./urbit-bin"
OS="$(uname -s)"
case "${OS}" in
Linux*) target="linux64";;
MINGW*) target="windows";;
Darwin*) target="darwin";;
CYGWIN*) target="windows";;
*) echo "UNKNOWN:${OS}"
@ynx0
ynx0 / vcf2csv.py
Created July 20, 2021 18:54
converts vcf files to csv
#!/usr/bin/env python3
import vobject
import csv
import sys
from functools import reduce
from collections.abc import Iterable
from pathlib import Path

Breaking Changes Summary

New Types

  • There is a new type reference that models a reference to either graph content or a reference to a group
    • A reference to a group takes a resource, while a reference to graph content takes a resource for the group and a uid

Breaking changes / Modified types:

  • content has now been modified. the subtype [%reference =uid] has now been changed to use the [%reference reference]
  • Graph store no longer accepts pokes with the mark %graph-update. Instead, it supports pokes with the mark %graph-update-1
@ynx0
ynx0 / run_replay_recovery.sh
Last active February 18, 2021 23:53
helper script for running recovery on an urbit ship. assumes pier is in current directory
#!/bin/bash
DRY_RUN=false
HARD_DELETE=true
#DEL="trash" # use this if you have trash-cli enabled and don't want to risk the script accidently deleting your precious jam files
DEL="rm"
SHIP_NAME=${1:-"sampel-palnet"} # change this or pass it in as a cmdline input
NUM_EVENTS=${2:-1000000} # change this or pass it in as a cmdline input
LATEST_EVENT="$(ls ./$SHIP_NAME/.urb/roc/ | cut -d'.' -f1 | sort -nr | head -n1)"
@ynx0
ynx0 / publish_post.viz
Last active February 6, 2021 21:35
WIP graphviz description of a publish post
digraph PublishPost {
// uses the dot engine
graph [rankdir="LR"];
node [shape="record"];
subgraph cluster_0 {
// color=blue
// node [style=filled];
// todo https://stackoverflow.com/questions/1554635/graphviz-how-to-have-a-subgraph-be-left-to-right-when-main-graph-is-top-to-bot
@ynx0
ynx0 / jamcue.py
Last active December 20, 2020 19:03
#!/bin/env python
import typing
from typing import Union, List, NamedTuple, Optional, Dict, Tuple, Iterable
atom = int
bloq = atom
patU = atom
patS = int # signed integer
cell = tuple # Tuple[atom] # tuple is used to model an immutable list. just list doesn't work b/c it is not `hash`able
@ynx0
ynx0 / config.ino
Last active July 11, 2019 21:44
Renaming an HC-06 Bluetooth module + (Password/PIN setup)
// from https://www.youtube.com/watch?v=jKWTVXj8JKo
// ref https://mcuoneclipse.com/2013/06/19/using-the-hc-06-bluetooth-module/
// if this doesn't work, we may have to do it manually,
// i.e. we have to follow this guide https://www.instructables.com/id/AT-command-mode-of-HC-05-Bluetooth-module/
// (don't worry it has 06 as well)
void setup() {
Serial.begin(9600);
delay(5000);