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
--- | |
import crypto from "node:crypto"; | |
import { getEntry } from "astro:content"; | |
import Icon from "./Icon.astro"; | |
interface Props { | |
href: string; | |
} |
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
customElements.define( | |
"i-frame", | |
class extends HTMLElement { | |
#shadow = this.attachShadow({ mode: "closed" }); | |
constructor() { | |
super(); | |
this.#shadow.innerHTML = ` | |
<slot></slot> | |
<iframe part="frame" srcdoc=""></iframe> |
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
import { XMLParser } from "fast-xml-parser"; | |
import fetch from "node-fetch"; | |
const RSS_URL = "https://jakelazaroff.com/rss.xml"; | |
const ACTIVITYPUB_HOST = "https://shine-thunder-forgery.glitch.me"; | |
const OUTBOX_URL = ACTIVITYPUB_HOST + "/test/outbox"; | |
const CREATE_URL = ACTIVITYPUB_HOST + "/admin/create"; | |
const ADMIN_USERNAME = "jake"; | |
const ADMIN_PASSWORD = "test"; |
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
type Fn<A, B> = (a: A) => B; | |
function compose<A, B>(f1: Fn<A, B>): Fn<A, B>; | |
function compose<A, B, C>(f1: Fn<B, C>, fn2: Fn<A, B>): Fn<A, C>; | |
function compose<A, B, C, D>( | |
fn1: Fn<C, D>, | |
f2: Fn<B, C>, | |
fn3: Fn<A, B> | |
): Fn<A, D>; | |
function compose<A, B, C, D, E>( |
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
alias hyper ctrl;alt;cmd | |
# maximize | |
bind m:${hyper} move screenOriginX;screenOriginY screenSizeX;screenSizeY | |
# center | |
bind c:${hyper} move screenSizeX/6;screenSizeY/6 2*screenSizeX/3;2*screenSizeY/3 | |
# edges | |
alias halfSizeX screenSizeX/2 |
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
# remap prefix from 'C-b' to 'C-a' | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# turn on mouse scrollback | |
setw -g mouse on | |
# index windows and panes at 1 | |
set -g base-index 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
// SKImage | |
// A simple class that draws a PaintCode StyleKit "Image Method" image centered inside a UIView | |
// - installation: add to project and replace STYLEKIT_NAME comment with name of StyleKit class | |
// - instantiation: SKImage(image: "NameOfImage") | |
// - instantiation (with custom size): SKImage(image: "NameOfImage", size: CGRectMake(0, 0, 16, 16)) | |
import UIKit | |
class SKImage: UIView { |
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
function nested(entity, path) { | |
path.split('.').some(function (property) { | |
entity = entity[property]; | |
return typeof entity === 'undefined'; | |
}); | |
return entity; | |
}; |
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
$column-width: 60px; | |
$gutter-width: 20px; | |
$line-height: 20px; | |
@function columns ($columns: 1) { | |
@return $columns * ($column-width + $gutter-width) - $gutter-width; | |
} | |
@function rows ($lines: 1) { | |
@return $line-height * $lines; |
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
# set prefix to ctrl+a | |
unbind C-b | |
set -g prefix C-a | |
bind a send-prefix | |
# use space to cycle between windows | |
bind-key C-a last-window | |
bind-key Space next-window | |
bind-key C-Space previous-window |
NewerOlder