Skip to content

Instantly share code, notes, and snippets.

View plmercereau's full-sized avatar

Pilou plmercereau

  • Brussels, Belgium
View GitHub Profile
@mhkeller
mhkeller / package.json
Last active September 16, 2025 20:36
Convert a parquet file to bytes representing an arrow table
{
"name": "parquet-to-arrow",
"version": "1.0.0",
"description": "",
"scripts": {
},
"dependencies": {
"apache-arrow": "^15.0.2",
"arrow-js-ffi": "^0.4.1",
"parquet-wasm": "^0.6.0-beta.2"
@svet-b
svet-b / ext4_mac_docker.md
Created May 10, 2021 19:33
Mount and edit SD card image with ext4 partitions on Mac using Docker

Go to the directory with the image you want to work with. Run a Docker container with that directory mounted:

docker run -it --privileged -v /dev:/dev -v (pwd):/tmp --workdir /tmp ubuntu bash

(replace (pwd) with "$PWD" if using bash instead of fish)

See this thread for an explanation of why --privileged and -v /dev:/dev are required. The need for the latter can be avoided with this alrternative workaround.

In the container, assuming that $IMAGE_FILE is the name of your image file:

@nh2
nh2 / nixos-rootfs.nix
Last active July 14, 2025 17:37
Example of how to build a NixOS root file system
# Build with:
# NIX_PATH=nixpkgs=$HOME/src/nixpkgs nix-build --no-link '<nixpkgs/nixos>' -A config.system.build.tarball -I nixos-config=thisfile.nix
# You can also use
# -A config.system.build.toplevel
# to build something you can browse locally (that uses symlinks into your nix store).
{config, pkgs, ...}:
{
# We need no bootloader, because the Chromebook can't use that anyway.
boot.loader.grub.enable = false;
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active December 7, 2025 06:00
crack activate Office on mac with license file
@stalniy
stalniy / abilities.js
Created January 5, 2018 20:58
CASL Vue routes
import { AbilityBuilder, Ability } from 'casl'
// Alternatively this data can be retrieved from server
export default function defineAbilitiesFor(user) {
const { rules, can } = AbilityBuilder.extract()
can('read', 'User')
can('update', 'User', { id: user.id })
if (user.role === 'doctor') {