While adjusting a node after having drawn with the pencil. Fedora 42, Inkscape 1.4.2-1 rpm
{ "signal": 11
, "executable": "/usr/bin/inkscape"
, "stacktrace":
[ { "crash_thread": true
, "frames":
{ "signal": 11
, "executable": "/usr/bin/inkscape"
, "stacktrace":
[ { "crash_thread": true
, "frames":
Grep Ruby's NEWS/NEWS.md file for text and show me what version it's mentioned in:
% git tag | grep '^v[123]_[0-9]_0$' | xargs -n1 sh -c 'printf "$1:NEWS.md\n$1:NEWS\n" | git cat-file --batch | grep -i "Array.filter" | sed -e "s@^@$1: @"' -
v2_6_0: * Array#filter is a new alias for Array#select. [Feature #13784]
v2_6_0: * Array#filter! is a new alias for Array#select!. [Feature #13784]
Run a command with the same environment values as another process:
| # A rough demo demo following the instructions | |
| # on https://docs.github.com/en/actions/tutorials/create-actions/create-a-javascript-action | |
| # | |
| define rollup_content = | |
| import commonjs from "@rollup/plugin-commonjs"; | |
| import { nodeResolve } from "@rollup/plugin-node-resolve"; | |
| const config = { | |
| input: "index.js", |
% sudo rm -r /tmp/overlay/upper; mkdir /tmp/overlay/upper
% docker volume create --driver local --opt type=overlay --opt o=lowerdir=/etc,upperdir=/tmp/overlay/upper,workdir=/tmp/overlay/work --opt device=overlay overlay-etc
# I've tried without --privileged, and with --security-opt label=disable, both still relabel all files.
% sudo docker run --volume overlay-etc:/etc2 --privileged ubuntu:latest date
Possibly the worst way to encode json in C?
% emcc example.c -o example.js -s DEFAULT_LIBRARY_FUNCS_TO_INCLUDE='$UTF8ToString,$stringToNewUTF8
% node example.js
JSON: {"name":"Captain Pants","id":0}
| # 'gem list -i foo' will print 'true' if a gem is already installed. 'false' otherwise | |
| GEMS=clamp rake | |
| # From the GEMS list, generate a list of make targets | |
| TARGETS=$(foreach gem,$(GEMS),gem-$(shell gem list -i $(gem))-$(gem)) | |
| build: $(TARGETS) | |
| build: | |
| @echo "=> OK to build" |
| const { DeviceDiscovery } = require('sonos'); | |
| DeviceDiscovery((device) => { | |
| //console.log('found device at ' + device.host + " - " + device.friendlyName) | |
| device.deviceDescription().then(descr => { | |
| // look for a sonos named "Sonos Roam" | |
| if (descr.friendlyName.match(/Sonos Roam/)) { | |
| console.log(descr); | |
| // Coheed - Vaxis II - first track |
Sometimes tar files have tar files, and it might be nice to read the contents of some files several layers deep. Here's how we can do it with Ruby and Python3 with no external dependencies.
We can create a layered tar file (a tar file containing other tar files) using docker save or podman save
% podman save fpm-ubuntu-18.04 -o test.tar
| --version 1.2.3.4 |
| [Unit] | |
| Description=no description given | |
| [Service] | |
| Type=simple | |
| User=root | |
| Group=root | |
| # Load env vars from /etc/default/ and /etc/sysconfig/ if they exist. | |
| # Prefixing the path with '-' makes it try to load, but if the file doesn't | |
| # exist, it continues onward. |