Skip to content

Instantly share code, notes, and snippets.

@YujiSoftware
YujiSoftware / HashMap.java
Created March 23, 2025 15:05
HashMap の実装 (Java 1.2.2)
/*
* @(#)HashMap.java 1.30 01/11/29
*
* Copyright 2002 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.util;
import java.io.*;
@YujiSoftware
YujiSoftware / Makefile
Last active February 22, 2025 14:37
Hello world! (by x86-64)
NAME = hello.bin
CC = gcc
SRCS = hello.S
OBJS = $(SRCS:.S=.o)
$(NAME) : $(OBJS)
$(LD) -e main -o $(NAME) $(OBJS)
clean :
$(RM) $(OBJS)
@YujiSoftware
YujiSoftware / metadata.json
Last active December 7, 2024 13:26
Rocky Linux 9.5 for Vagrant
{
"name": "rockylinux/9",
"description": "",
"short_description": "",
"versions": [
{
"version": "4.0.1",
"description_html": "<p><a href=\"https://docs.rockylinux.org/release_notes/9_5/\" rel=\"nofollow\">https://docs.rockylinux.org/release_notes/9_5/</a></p>\n",
"description_markdown": "https://docs.rockylinux.org/release_notes/9_5/",
"providers": [
@YujiSoftware
YujiSoftware / Main.java
Last active November 3, 2024 12:55
WebKit由来のソースコード行数を調べる
package yuji.software;
import java.io.*;
import java.nio.file.Files;
import java.nio.file.Path;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Stream;
@YujiSoftware
YujiSoftware / NG1.java
Created December 13, 2023 16:02
Java の文字列リテラルの最大長は?
import java.nio.charset.StandardCharsets;
public class NG1 {
public static void main(String[] args) {
String str = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@YujiSoftware
YujiSoftware / Main.class
Last active May 27, 2023 15:05
javap -v Main.java
Classfile /home/yuji/repos/gist/jjug_ccc_2023/sample/com/example/Main.class
Last modified 2023/05/28; size 426 bytes
SHA-256 checksum 2887486397f85a098cd8908463d9499351497938089eafc72988a5cbaf4b55e0
Compiled from "Main.java"
public class com.example.Main
minor version: 0
major version: 64
flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: #21 // com/example/Main
super_class: #2 // java/lang/Object
@YujiSoftware
YujiSoftware / specifications.rb
Created November 23, 2022 07:27
Removed old spec macros and insert specifications macro. For https://github.com/mdn/translated-content/issues/5618
#!/bin/env ruby
content_dir = File.expand_path(ARGV[0])
translated_dir = File.expand_path(ARGV[1])
Dir.glob("**/*.md", base: translated_dir).each do |path|
content_file = "#{content_dir}/#{path}"
translated_file = "#{translated_dir}/#{path}"
has = false
#!/bin/env ruby
require 'yaml'
require 'json'
removed = Hash.new { |hash, key| hash[key] = 0 }
ARGV.each do |base|
Dir.glob(["**/*.html", "**/*.md"], base: base).each do |path|
file = File.join(base, path)
@YujiSoftware
YujiSoftware / Main.java
Last active December 14, 2021 16:54
ラムダのコンパイル結果を5分で説明するよ
import java.lang.String;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
public class Main {
public static void main(String[] args) {
sortByLength(Arrays.asList(args));
}
diff --git a/files/ja/mozilla/add-ons/webextensions/api/alarms/alarm/index.html b/files/ja/mozilla/add-ons/webextensions/api/alarms/alarm/index.html
index 6d91ff819..56bbda4ba 100644
--- a/files/ja/mozilla/add-ons/webextensions/api/alarms/alarm/index.html
+++ b/files/ja/mozilla/add-ons/webextensions/api/alarms/alarm/index.html
@@ -34,9 +34,3 @@ translation_of: Mozilla/Add-ons/WebExtensions/API/alarms/Alarm
<p>{{Compat("webextensions.api.alarms.Alarm")}}</p>
-<p>{{WebExtExamples}}</p>
-