Skip to content

Instantly share code, notes, and snippets.

View Nomeyho's full-sized avatar
💻

Stéphane Vanberg Nomeyho

💻
View GitHub Profile
@Nomeyho
Nomeyho / convert-thai-years.mjs
Created August 31, 2025 11:15
Immich: convert Thai dates
const IMMICH_URL = "http://192.168.1.54:30041/api";
const API_KEY = "";
const YEAR_THRESHOLD = 2500; // Thai years
const YEARS_TO_REMOVE = 543;
async function listAssets(page = 1) {
const res = await fetch(`${IMMICH_URL}/search/metadata`, {
method: "POST",
headers: {
"Content-Type": "application/json",
@Nomeyho
Nomeyho / remove-duplicates.mjs
Created August 31, 2025 10:44
Immich: remove duplicates between two users
const IMMICH_URL = "http://192.168.1.54:30041/api";
const USER_A = ""; //
const USER_A_API_KEY = "";
const USER_B = "";
const USER_B_API_KEY = "";
async function fetchAssets(userId, apiKey) {
const assets = [];
let page = "1";
@Nomeyho
Nomeyho / swf2png.java
Last active March 18, 2020 21:07
SWF to PNG - convert a SWF file to a PNG image using ffdec (Java)
SWF swf = ...
Timeline timeline = swf.getTimeline();
// force transparent background
timeline.getFrame(0).backgroundColor = new RGBA(255, 255, 255, 0);
final BufferedImage image = SWF.frameToImageGet(timeline, 0, 0, null, 0, timeline.displayRect, new Matrix(), null, null,5).getBufferedImage();
ImageHelper.write(image, ImageFormat.PNG, new File("output.png"));
@Nomeyho
Nomeyho / README.md
Last active January 13, 2019 16:43
React + decorator

React + Decorator

Add decorator support (e.g. Mobx) to a React application created with create-react-app

  1. npm install --save-dev react-app-rewired babel-plugin-transform-decorators-legacy
  2. Replace react-scripts with react-app-rewired in package.json (see below)
  3. Create a new file 'config-overrides.js' at the root of the project (next to node_modules) and copy the content below.

For react-app-rewired < 2.0.1, use https://gist.github.com/imekachi/4edd1d3637bdb02f26c5dc4c371722af