Skip to content

Instantly share code, notes, and snippets.

@krashanoff
krashanoff / pointer_aliasing.go
Created January 19, 2024 23:06
Simple program to demonstrate Go's iterator aliasing.
package main
import "fmt"
type A struct {
b int
}
func main() {
theAs := []A{}
// twdl
//
// A Deno script for downloading images you like on Twitter.
//
import { parse } from "https://deno.land/std@0.104.0/flags/mod.ts";
import { copy, readerFromStreamReader } from "https://deno.land/std@0.104.0/io/mod.ts";
const { name = null, count = 200, out = "out", fmt = "", ...args } = parse(Deno.args);
if (!name) {
@krashanoff
krashanoff / get_info.py
Last active May 2, 2021 07:09
Simple program to pretty-print a request to YouTube's `get_video_info` endpoint.
#!/usr/bin/python3
# Leo Krashanoff
# (c) 2021
# Subject to contents of MIT License
#
# Originally written for maguro: https://github.com/krashanoff/maguro
from urllib.parse import parse_qs, unquote
from requests import get