-XX:NativeMemoryTracking=detail
jps
ps -p <PID> -o pcpu,rss,size,vsize
// Copyright (c) 2024 Elric Neumann. All rights reserved. MIT license. | |
#![allow(unused)] | |
use std::rc::Rc; | |
use std::cell::{Cell, RefCell}; | |
use std::collections::{HashMap, HashSet}; | |
pub trait GcObject { | |
fn trace(&self, tracer: &TracingGC); | |
} |
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
// ==UserScript== | |
// @name HackerNews GPT-Free Feed | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Hides any Hacker News story with "GPT" in its title. | |
// @author Taylor Troesh | |
// @include https://news.ycombinator.com/* | |
// @grant none | |
// ==/UserScript== |
{ | |
description = "Python dev shell"; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
flake-utils.url = "github:numtide/flake-utils"; | |
mach-nix.url = "github:davhau/mach-nix"; | |
}; | |
outputs = { self, nixpkgs, flake-utils, mach-nix, ... }: | |
flake-utils.lib.eachDefaultSystem | |
(system: |
#!/usr/bin/env bash | |
set -xeuo pipefail | |
create_bridge() { | |
local nsname="$1" | |
local ifname="$2" | |
echo "Creating bridge ${nsname}/${ifname}" |
This is a demonstration of using Preact without any build tooling. The library is linked from the esm.sh CDN, however a standalone JS file exporting HTM + Preact + Hooks can also be downloaded here.
//> using scala "3.2.0" | |
//> using javaOpt "--add-opens", "java.base/java.nio=ALL-UNNAMED", "--add-opens", "java.base/sun.nio.ch=ALL-UNNAMED" | |
//> using lib "fr.janalyse::zio-lmdb:0.0.1" | |
//> using lib "fr.janalyse::zio-worksheet:2.0.2.0" | |
// --------------------- | |
import zio.* | |
import zio.lmdb.* | |
import zio.json.* | |
import java.io.File |
// summary : hello world http server (zhttp zio based) using tapir | |
// keywords : scala, zio, tapir, http, zhttp, endpoints, @testable | |
// publish : gist | |
// authors : David Crosson | |
// license : Apache | |
// id : fd3e1ee8-afe4-4c3d-a9fe-5e0f16a985ad | |
// created-on : 2021-11-20T13:51:35+01:00 | |
// managed-by : https://github.com/dacr/code-examples-manager | |
// run-with : scala-cli $file | |
// test-with : curl http://127.0.0.1:8080/hello |
# To extract the sound from a video and save it as MP3: | |
ffmpeg -i <video.mp4> -vn <sound>.mp3 | |
# To convert frames from a video or GIF into individual numbered images: | |
ffmpeg -i <video.mpg|video.gif> <frame_%d.png> | |
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: | |
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif> | |
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: |