Skip to content

Instantly share code, notes, and snippets.

-- 準備
CREATE EXTENSION plv8;
CREATE TABLE test (
id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY,
value jsonb
);
CREATE OR REPLACE PROCEDURE populate_test_table()
@taku0
taku0 / my_number_collision.rb
Created May 10, 2023 11:24
マイナンバーカードのコンビニ交付を1年に89000件処理したときに、秒単位で付けたファイル名がかぶる確率
# 1年の秒数
total = 365 * 24 * 60 * 60 # 31,536,000
# 1年の処理件数
count = 89000
# 被らない確率
safe_probability = 1.0
# クジを引いて、まだ残っている数
protocol P {
func aaa() -> Int
}
class Foo: P {
func aaa() -> Int {
return 1
}
}
(require 'svg)
(let* ((checkbox (propertize
"☐"
'display (append
(svg-image `(svg
((width . "16pt")
(height . "16pt"))
(rect ((x . "1px")
(y . "1px")
#!/bin/sh
# Get sample Java application.
test -f JavaSample.java || wget https://raw.githubusercontent.com/taku0/JavaSample/master/JavaSample.java || exit -1
# Get media file.
test -f BigBuckBunny_320x180.mp4 || wget https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4 || exit -1
# Builds SDKs and JDKs.
for i in {,pkgsi686Linux.}openjfx{11,16}-sdk adoptopenjdk-hotspot-bin-{11,16} zulu graalvm11-ce openjdk{11,16}
@taku0
taku0 / configuration.nix
Created February 13, 2021 07:17
NixOS configuration for MinIO (#67684)
{ config, pkgs, ... }:
# rm -f nixos.qcow2 && nixos-rebuild build-vm -I nixos-config=./configuration.nix -I nixpkgs=. && ./result/bin/run-nixos-vm
{
nix.useSandbox = true;
nix.buildCores = 0;
nix.optimise.automatic = true;
nixpkgs.config.allowUnfree = true;
indirect enum FingerTree<T> {
case Empty,
Single(_ value: T),
Deep(
left: Digit<T>,
child: FingerTree<Node<T>>,
right: Digit<T>
)
}
diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
index 96abdffe368..4b6e49e8b89 100644
--- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
+++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
@@ -3,9 +3,9 @@ sourcePerArch:
{ stdenv
, lib
, fetchurl
-, autoPatchelfHook
, alsaLib
#!/bin/bash
xdotool search --onlyvisible --name 'emacs' windowactivate type '
i
// swift-mode:test:eval (setq-local swift-mode:basic-offset 4)
// swift-mode:test:eval (setq-local swift-mode:parenthesized-expression-offset 2)
// swift-mode:test:eval (setq-local swift-mode:multiline-statement-offset 2)
// swift-mode:test:eval (setq-local swift-mode:switch-case-offset 0)
// Constant declarations
$ git show HEAD
commit c637aeff19b57b620a27029188060c76c6022dc1 (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Merge: 4d4b67b65e8 bf484519590
Author: markuskowa <markus.kowalewski@gmail.com>
Date: Sun Mar 31 12:51:59 2019 +0200
Merge pull request #58541 from luispedro/add_megahit
megahit: init at 1.1.4