Skip to content

Instantly share code, notes, and snippets.

View keltia's full-sized avatar

Ollivier Robert keltia

View GitHub Profile
@thoughtpolice
thoughtpolice / jjconfig.toml
Last active July 5, 2025 10:11
my jujutsu config
## ------------------------------------------------------------------------------------------------
# Schema published automatically on the website. This allows TOML language
# servers to autocomplete and show documentation for the entries below.
#
# I use the prerelease version as my builds on my machines are often from trunk.
"$schema" = "https://jj-vcs.github.io/jj/prerelease/config-schema.json"
## ------------------------------------------------------------------------------------------------
## ---- Basic settings
@ilyagr
ilyagr / jj-vim.md
Last active April 29, 2025 15:26
Using Vim as a `jj` difftool with the DirDiff plugin or vimtabdiff.py script

vimdiff comes as a pre-configured merge tool for jj and can be used with jj resolve out of the box. However, the default configuration for vimdiff as a diff editor (for jj split, etc.) is barely useable.

To more conveniently use Vim as a difftool for jj, try one of the following setups:

DirDiff plugin

  1. Install the DirDiff Vim plugin.
@jpmens
jpmens / arpaname.py
Created December 1, 2022 15:10
Ansible filter convert IP to arpaname
# arpaname.py, (C)2022 by Jan-Piet Mens <[email protected]>
# Convert an IPv4 or IPv6 address in textual form into a string whose value is
# the reverse-map domain name of the address.
#
# - debug: msg="{{ "192.168.1.3" | arpaname }}"
# "3.1.168.192.in-addr.arpa."
#
# - debug: msg="{{ "2001:DB8::7" | arpaname }}"
# "7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa."
@mcastorina
mcastorina / Cargo.toml
Created August 6, 2020 02:03
Clap and rustyline tab completion integration
[package]
name = "tmp"
version = "0.1.0"
authors = ["Miccah Castorina <[email protected]>"]
edition = "2018"
[dependencies]
clap-v3 = { version = "3.0.0-beta.1", features = ["yaml"] }
rustyline = "6.2.0"
serde_yaml = "0.8"
@mizhka
mizhka / sysctl-tunables
Created June 4, 2019 09:40
FreeBSD 13-GENERIC-CURRENT tunables
kern.maxproc: Maximum number of processes
kern.ngroups: Maximum number of supplemental groups a user can belong to
kern.ipc.shm_allow_removed: Enable/Disable attachment to attached segments marked for removal
kern.ipc.shm_use_phys: Enable/Disable locking of shared memory pages in core
kern.ipc.shmall: Maximum number of pages available for shared memory
kern.ipc.shmseg: Number of segments per process
kern.ipc.shmmni: Number of shared memory identifiers
kern.ipc.shmmin: Minimum shared memory segment size
kern.ipc.shmmax: Maximum shared memory segment size
kern.ipc.semaem: Adjust on exit max value
@fdv
fdv / .tmux.conf
Last active May 3, 2024 02:02
Emoji / UTF-8 in IRSSI with tmux. Tested on FreeBSD 11.3 with zsh 5.6.2, tmux 2.7 and irssi 1.1.1 or later
#
set -g default-terminal screen-256color
set -g status-bg blue
set -g status-fg white
set -g status-right '#(sysctl vm.loadavg)'
setw -g window-status-current-attr underscore
bind r source-file ~/.tmux.conf
@dlangille
dlangille / 0 - the problems
Last active December 17, 2018 22:29
Let's upgrade one ezjail to iocage
The list of 'symlink has no referent' ... those all have to be created by hand, with no easy way to know what they should be.
We want [most of?] them to persist in the new jail.
How do to that?
@fdv
fdv / Install.md
Last active April 16, 2018 10:00
Dhclient6 for FreeBSD configuration

Install the package

pkg install isc-dhcp43-client

/etc/rc.conf

ipv6_enable_all_interfaces="YES"
@bortzmeyer
bortzmeyer / bgproute.md
Created June 20, 2017 11:47
Get the AS (IPv4 only) froma DNS request
bgproute () {
	if [ -z "$1" ]
	then
		echo "Usage: bgproute IP-address"
		return 1
	fi
	dig +short TXT `echo $1 |                awk -F. '{print $4 "." $3 "." $2 "." $1 ".aspath.routeviews.org" }'` | awk -F\" '{print "AS path: " $2 "\nRoute: " $4 "/" $6}'
}
@tut-tuuut
tut-tuuut / delete-tweets-from-twitarchive.rb
Last active May 17, 2018 20:12
Delete every tweet contained in your tweet archive. Forked from https://gist.github.com/robinsloan/3688616
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = ""
TWITARCHIVE_TWEETS = "/eg/path/to/your/twitarchive/data/js/tweets"
# get these from dev.twitter.com
CONSUMER_KEY = ""