Skip to content

Instantly share code, notes, and snippets.

View xkikeg's full-sized avatar

kikeg xkikeg

  • Zürich, Switzerland
  • 07:55 (UTC +02:00)
View GitHub Profile
@xkikeg
xkikeg / swisspass_to_csv.js
Created July 27, 2026 08:23
Swisspass to CSV Tampermonkey csript
// ==UserScript==
// @name Swisspass Halbtax Plus
// @namespace http://tampermonkey.net/
// @version 1.0.0
// @description Get CSV out of Halbtax Plus
// @author kikeg
// @match https://www.swisspass.ch/info/abos/detailRefilledContract/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=swisspass.ch
// @grant GM.setClipboard
// ==/UserScript==
@xkikeg
xkikeg / bench.rs
Created December 17, 2024 15:15
Initial impl for the price_db
use chrono::{Days, NaiveDate};
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
use snippets::price_db::{BTreeCachedPriceDB, CachedPriceDB, FakeCommodityStore, PriceDBHashMap};
fn price_db_bench(c: &mut Criterion) {
let mut group = c.benchmark_group("price-db");
for num_dense in [5usize, 10, 20].iter() {
group.bench_with_input(
BenchmarkId::new("naive", num_dense),
num_dense,
@xkikeg
xkikeg / LICENSE
Created January 9, 2023 07:21
LICENSE for all my gists (unless otherwise specified)
MIT License
Copyright (c) 2023 xkikeg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@xkikeg
xkikeg / revolut_to_ledger.js
Last active January 1, 2024 20:32
Extract Ledger-cli format string out of Revolut transactions page
// ==UserScript==
// @name Revolut.com to ledger
// @version 1.2
// @grant GM.setClipboard
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @match https://app.revolut.com/transactions*
// ==/UserScript==
@xkikeg
xkikeg / money_forward_to_ledger.js
Last active July 21, 2026 08:44
Create ledger text out of Money forward (https://moneyforward.com/)
// ==UserScript==
// @name Moneyforward to ledger
// @version 1
// @grant GM.setClipboard
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @match https://moneyforward.com/accounts/show/*
// ==/UserScript==
function runReport(node) {
var result = [];
@xkikeg
xkikeg / wise_to_ledger.js
Last active September 21, 2021 09:26
Greasemonkey script to convert wise.com account to https://github.com/ledger/ledger/ format file.
// ==UserScript==
// @name Wise.com to ledger
// @version 1
// @grant GM.setClipboard
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @match https://wise.com/user/account/*
// ==/UserScript==
function getPayee(node) {
@xkikeg
xkikeg / file0.txt
Last active August 29, 2015 14:10
PureScript開発に至る前の環境整備 ref: http://qiita.com/liquid_amber/items/c9a439813cb0ca8649bc
$ # Ubuntu
$ # nodebrewで入れた see http://qiita.com/sinmetal/items/154e81823f386279b33c
$ # Mac
$ brew install node
@xkikeg
xkikeg / LICENSE
Last active December 22, 2016 10:39
Database.Esqueletoのサンプル
Copyright (c) 2014 liquid_amber
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@xkikeg
xkikeg / test.cc
Last active August 29, 2015 14:04
型の包含関係を調べるテンプレート
// for test
#include <memory>
#include <string>
#include <vector>
#include "type_inclusion.hh"
#define TO_STR(x) TO_STR_(x)
#define TO_STR_(x) #x
#define STATIC_ASSERT_SIMPLE(x) static_assert(x, TO_STR(x));
import System.IO (hFlush, stdout)
import Control.Concurrent (threadDelay)
main = do
putStr "\ESC[0G\ESC[0Ktest1 " >> hFlush stdout
threadDelay 1000000
putStr "\ESC[0G\ESC[0Ktest2 " >> hFlush stdout
threadDelay 1000000
putStr "\ESC[0G\ESC[0Ktest3 " >> hFlush stdout
putStrLn ""