Skip to content

Instantly share code, notes, and snippets.

View ushitora-anqou's full-sized avatar
🤪
Lots of fun

Ryotaro Banno ushitora-anqou

🤪
Lots of fun
View GitHub Profile
local loop(i) =
if i >= 100000 then 0
else if false then 1
else loop(i + 1) tailstrict;
loop(0)
diff -rup libgda-ui/data-entries/gdaui-entry-bin.c libgda-ui/data-entries/gdaui-entry-bin.c
--- libgda-ui/data-entries/gdaui-entry-bin.c 2020-11-09 05:23:19.000000000 +0900
+++ libgda-ui/data-entries/gdaui-entry-bin.c 2024-12-31 14:09:02.448329140 +0900
@@ -239,11 +239,11 @@ create_entry (GdauiEntryWrapper *mgwrap)
label = gtk_label_new ("");
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- dbin->priv->button_label = g_object_ref (G_OBJECT (label));
+ dbin->priv->button_label = (GtkWidget *)(g_object_ref (G_OBJECT (label)));
@ushitora-anqou
ushitora-anqou / gist:96dd3eec4de775dc07c710ba40cd0d52
Created December 30, 2024 16:14
Build failure: libgda-5.2.10
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/ck1277kkm7qlidvd1a8yf02skkz0kd73-libgda-5.2.10.tar.xz
source root is libgda-5.2.10
setting SOURCE_DATE_EPOCH to timestamp 1604883669 of file libgda-5.2.10/ChangeLog
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/x92hpllg20ifxqkbxx8q89b36998iriz-9859479884fad5f39e6c37e8995e57c28b11b1b9.diff
patching file m4/mysql.m4
applying patch /nix/store/4a8zq5v2lfc42znhaib2vi95rqasck3m-CVE-2021-39359.patch
17a18
> #include "compat.h"
42c43
< char *filename;
---
> const char *filename;
158c159
< memcpy(String_val(tmp), buf + rowbytes * i, rowbytes);
---
> memcpy(Bytes_val(tmp), buf + rowbytes * i, rowbytes);
#!/usr/bin/bash -xeu
set -o pipefail
DOMAIN=mstdn.anqou.net
ACCESS_TOKEN=
list-domains(){
curl -H "Authorization: Bearer ${ACCESS_TOKEN}" https://${DOMAIN}/api/v1/notifications | \
jq -r '.[].account.acct' | \
#!/usr/bin/bash
if [ $(basename "$1") = "io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.ml" ]; then
sed -i "s/Io_k8s_apiextensions_apiserver_pkg_apis_apiextensions_v1_json_schema_props.//g" "$1"
fi
# OCAML_POST_PROCESS_FILE="$PWD/postprocess.sh" java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.29/api/openapi-spec/swagger.json -g ocaml -o out/ocaml --enable-post-process-file
@ushitora-anqou
ushitora-anqou / deploy.yaml
Created September 28, 2023 11:53
Qash deploy workflow
name: Deploy
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
@ushitora-anqou
ushitora-anqou / calendar2todoist.gs
Last active November 1, 2022 02:24
Transfer plans in Google calendar to Todoist
const CALENDAR_IDS = ["カレンダー連携ID"];
const TODOIST_TOKEN = "Todoistトークン";
const TODOIST_PROJECT_ID = "Todoist追加先プロジェクトID";
function pad02(s) {
return ("0" + s).slice(-2);
}
function createTodoistTasks(todoistToken, todoistProjectId, tasks, dateForAllDayTask) {
for (let task of tasks) {
@ushitora-anqou
ushitora-anqou / slide4to1.sh
Created December 23, 2021 09:13
Split 4-slide pages into separate ones
#!/usr/bin/bash
#
# 0 -1 -348
# -->|
# ----------------------->|
#
# +----------+ +----------+
# | | | |
# | SLIDE #1 | | SLIDE #2 |
@ushitora-anqou
ushitora-anqou / beamer_fukidashi.tex
Last active October 19, 2021 09:08
LaTeX Beamer callouts
\documentclass[dvipdfmx]{beamer}
\usepackage{tikz}
\usetikzlibrary{shapes.callouts,tikzmark,calc}
% Usage: \COLabel{name#1}{text#2}
% e.g.: \COLabel{psi1}{$\psi_1$}
\newcommand{\COLabel}[2]{%
\tikz[%
remember picture,%
baseline=(#1.base),%