ssh-from
simplifies common usage of SSH tunnels.
It instructs SSH to start a SOCKS proxy, and spawns a (local) shell that uses this proxy.
$ ssh-from my-host
$ curl http://foo/bar # the request is tunnelled through my-host
#!/usr/bin/env python3 | |
''' | |
Portable* ISO Base Media File Format dissector / parser. | |
Usage: ./mp4parser.py <file name> | |
(*) Needs Python 3.8+ | |
Goals / development guidelines: | |
- Low level. Meant as a dissector, i.e. to obtain info about the structure of the file |
#!/usr/bin/python | |
""" | |
signalis.py decode <input.png> <output.json> | |
signalis.py encode <input.json> <output.png> | |
the decoder does NOT validate the input image! to do that, encode data again and check image pixels match | |
""" | |
import os, sys | |
import numpy as np |
[Tuya][]'s IR blasters, like the [ZS08][], have the ability to both learn and blast generic IR codes. These IR codes are given to the user as an opaque string, like this:
A/IEiwFAAwbJAfIE8gSLIAUBiwFAC+ADAwuLAfIE8gSLAckBRx9AB0ADBskB8gTyBIsgBQGLAUALA4sB8gRAB8ADBfIEiwHJAeARLwHJAeAFAwHyBOC5LwGLAeA97wOLAfIE4RcfBYsB8gTyBEAFAYsB4AcrCYsB8gTyBIsByQHgPY8DyQHyBOAHAwHyBEAX4BVfBIsB8gTJoAMF8gSLAckB4BUvAckB4AEDBfIEiwHJAQ==
Not much is known about the format of these IR code strings, which makes it difficult to use codes obtained through other means (such as a
open import Level using (suc; _⊔_) | |
open import Function using (id; _∘_) | |
open import Data.List as List using ( | |
List; []; _∷_; [_]; map; reverse; align; alignWith; foldr; head; last; drop; length | |
) | |
import Data.List.Properties as List | |
import Data.List.Relation.Unary.All as All | |
import Data.List.Relation.Binary.Pointwise as PW |
import java.awt.*; | |
import java.awt.datatransfer.*; | |
import java.awt.image.*; | |
import java.io.*; | |
public class Main { | |
public static void main(String[] arg) { | |
var flavorMap = (FlavorTable) SystemFlavorMap.getDefaultFlavorMap(); | |
System.out.println("formats for image flavor: "); | |
for (var format : flavorMap.getNativesForFlavor(DataFlavor.imageFlavor)) |
use std::{ops::{Add, AddAssign}, convert::TryInto}; | |
/// In-place unstable radix sort with sentinel | |
/// | |
/// - `L` is the type used for bin counts (must be able to hold `arr.len()`). | |
/// - `key: F` is a function taking an array item + a level, and returning an alphabet symbol. | |
/// - `AL` is the alphabet length, i.e. number of bins. it must hold that `key(...) < AL`. | |
/// | |
/// 0 is the sentinel, meaning that for any item, `key(item, max_level) == 0`. | |
/// `max_level` may differ among items. |
This method is not netinst. The ISO is downloaded from a URL into RAM, and mounted. After that, installation proceeds exactly as if it was a pen drive / CDROM, and the network cable can be disconnected if you want.
You do not need internet in either computer, just the ISO file.
We don't touch any system files, just delete $TFTPROOT
and dnsmasq.conf
when you're done.
''' | |
Reads the contents of a TCP stream carrying [one side of] an | |
RTMP connection, and blindly dumps streams above 0 in an FLV. | |
$ ./rtmp2flv.py < tcp-stream > video.flv | |
''' | |
from enum import IntEnum, unique | |
from dataclasses import dataclass, field | |
from typing import NamedTuple, Self, Optional |