Skip to content

Instantly share code, notes, and snippets.

View iandol's full-sized avatar
👾
typing away...

Ian Max Andolina iandol

👾
typing away...
View GitHub Profile
@iandol
iandol / config.yaml
Created August 15, 2026 15:23
Hermes config
model:
api_mode: chat_completions
base_url: https://openrouter.ai/api/v1
default: deepseek/deepseek-v4-flash-0731
provider: openrouter
fallback_providers:
- provider: glm
model: glm-5.2
api_mode: chat_completions
base_url: https://open.bigmodel.cn/api/paas/v4
@iandol
iandol / zotero-search.sh
Last active April 13, 2026 09:06
Uses BetterBibTeX JSON-RPC API to search Zotero from command line. You can call it like this: `zoteroSearch '[["itemID", "is", "12187"]]' | jq '.result[0].citekey'` which will search for itemID and return just the citekey
#!/bin/zsh
# Check if an argument was provided
if [[ -z "$1" ]]; then
echo "Usage: $0 '[\"creator\", \"contains\", \"Doe\"]'"
exit 1
fi
# The search terms passed as the first argument
# Example: '["creator", "contains", "Johnny"]'
@iandol
iandol / change-machine-id.md
Created August 2, 2025 09:56 — forked from dllud/change-machine-id.md
How to change a cloned GNU/Linux machine's identity

How to change a cloned GNU/Linux machine's identity

You've just finished installing and configuring all those packages on your first machine. Now it's just a matter of cloning the hard drive into all the others and changing the hostname. Right?

Well, not so easy. If you wish to avoid conflicts on your network, backups and elsewhere, i.e. if you wanna end up with a unique fingerprint for each machine, you must go a few steps further.

Here follows a checklist to help you out. It's aimed at Debian and derivates (e.g. Ubuntu), though other distros won't be much different.

The old way: edit /etc/hostname and /etc/hosts

@iandol
iandol / physics2D.m
Last active January 8, 2024 09:32
Simple rigid body 2D physics of a circle in MATLAB
% Define parameters
radius = 1; % circle radius
mass = 1; % circle mass
speed = 10;
angle = deg2rad(45);
[xv,yv]=pol2cart(angle,speed);
initialPosition = [-7, -7]; % initial position (x, y)
initialVelocity = [xv, yv]; % initial velocity (vx, vy)
timeStep = 0.1; % time step
simulationTime = 10; % total simulation time
@iandol
iandol / imrec.m
Last active December 27, 2023 06:49
Create stimulus frame movie from a previous opticka experiment.
% This script loads a previous opticka experiment, then uses the screen and
% stimulus and task values to generate a series of movies or pictures for
% each stimulus frame. This assumes a single variable (i.e. angle). It runs
% 0.25 only showing fixation cross, then 1.5 secs of the stimulus, then
% another 0.25 seconds blank.
%%
% lets load from the saved MAT file
[mat,p] = uigetfile('*.mat','Select the Experiment MAT file');
if isnumeric(mat); return; end
@iandol
iandol / log.txt
Created October 25, 2023 01:21
64bit Debian 12 Raspberry Pi 4 VBLSyncTest Log
>> Screen('Preference','verbosity',10)
ans = 3
>> VBLSyncTest
RandR: 1920x1080 (0x47) 148.5MHz
h: width 1920 start 2008 end 2052 total 2200 skew 0
v: height 1080 start 1082 end 1087 total 1125
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 64-Bit (Version 3.0.19 - Build date: Oct 16 2023).
PTB-INFO: OS support status: Linux 6.1.0-rpi4-rpi-v8 Supported.
@iandol
iandol / setup.sh
Created May 20, 2023 11:04
micromamba setup for shell -- micromamba shell hook -s zsh -p ~/micromamba
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__mamba_exe() (
"$MAMBA_EXE" "$@"
)
__mamba_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
@iandol
iandol / 32bit.log
Created December 8, 2022 01:29
PTB (git a6edbf2) + Raspberry Pi 4 8GB — 32bit vs. 64bit OS comparison for VBLSyncTest at Verbosity = 10 — OS is updated as of 2022-12-08
>> Screen('Preference','Verbosity',10)
ans = 3
>> VBLSyncTest
RandR: 1920x1080 (0x48) 148.5MHz
h: width 1920 start 2008 end 2052 total 2200 skew 0
v: height 1080 start 1084 end 1089 total 1125
PTB-INFO: This is Psychtoolbox-3 for GNU/Linux X11, under GNU/Octave 32-Bit (Version 3.0.18 - Build date: Aug 4 2022).
PTB-INFO: OS support status: Linux 5.15.76-v7l+ Supported.
@iandol
iandol / lazypirateclient.py
Created February 19, 2022 14:28
Lazypirate server / client test
#
# Lazy Pirate client
# Use zmq_poll to do a safe request-reply
# To run, start lpserver and then randomly kill/restart it
#
# Author: Daniel Lundin <dln(at)eintr(dot)org>
#
import itertools
import logging
import sys
@iandol
iandol / Client log [ERROR]
Created February 19, 2022 12:19
Trying to get this demo code working: https://abhitronix.github.io/vidgear/latest/help/netgear_ex/#using-netgear-with-webgear — I get a client error about ZMQ. Running the basic ZMQ REP/REQ code works over the same network address+port
❯ python client.py
12:08:59 :: Helper :: INFO :: Running VidGear Version: 0.2.5
12:08:59 :: Helper_Async :: DEBUG :: Found valid WebGear data-files successfully.
12:08:59 :: WebGear :: DEBUG :: `/Users/ian/.vidgear/webgear` is the default location for saving WebGear data-files.
12:08:59 :: WebGear :: WARNING :: Given source is of NoneType. Therefore, JPEG Frame-Compression is disabled!
12:08:59 :: WebGear :: DEBUG :: Initiating Video Streaming.
12:08:59 :: WebGear :: DEBUG :: Running Starlette application.
INFO: Started server process [17175]
INFO: Waiting for application startup.
INFO: Application startup complete.