At first glance, Cairo looks like Python but it is really a vm + an assembly language with a lot of sugar on top. Without internalizing, this your headspace will not be in the right place.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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%; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import vobject | |
import csv | |
import sys | |
from functools import reduce | |
from collections.abc import Iterable | |
from pathlib import Path |
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 auid
- A reference to a group takes a
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
NewerOlder