Skip to content

Instantly share code, notes, and snippets.

View jyukutyo's full-sized avatar

Koichi Sakata jyukutyo

View GitHub Profile
@jyukutyo
jyukutyo / powerpointfontsetting.xml
Created December 2, 2019 03:36
~/Library/Group\ Containers/UBF8T346G9.Office/User\ Content.localized/Themes.localized/Theme\ Fonts
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<a:fontScheme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="jyukutyo">
<a:majorFont>
<a:latin typeface="Helvetica"/>
<a:ea typeface="Meiryo"/>
<a:cs typeface=""/>
</a:majorFont>
<a:minorFont>
<a:latin typeface="Helvetica"/>
<a:ea typeface="Meiryo"/>
@jyukutyo
jyukutyo / Temp.java
Created August 31, 2019 22:08
Bytecode representation of numerical values
public class Temp {
public static void main(String[] args) {
System.out.println(1);
System.out.println(127);
System.out.println(1000);
System.out.println(10000000);
System.out.println(100000000000000000l);
System.out.println(100000000000000000d);
}
}
@jyukutyo
jyukutyo / Emacs.keylayout
Created June 24, 2019 07:38
~/Library/Keyboard Layoutsに配置する
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.8 on 2015-04-03 at 16:32 (GMT+9)-->
<!--Last edited by Ukelele version 2.2.8 on 2015-04-03 at 16:35 (GMT+9)-->
<keyboard group="0" id="4139" name="Emacs_beats_vi" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>
public List<Integer> primeNumbersTill(int n) {
return IntStream.rangeClosed(2, n)
.filter(x -> isPrime(x))
.boxed()
.collect(Collectors.toList());
}
private boolean isPrime(int number) {
return IntStream.rangeClosed(2, (int) (Math.sqrt(number)))
.allMatch(n -> number % n != 0);
@jyukutyo
jyukutyo / CMakeLists.txt
Last active May 13, 2022 17:11
Build OpenJDK on CLion
cmake_minimum_required(VERSION 3.7)
project(hotspot)
include_directories(
src/hotspot/cpu
src/hotspot/os
src/hotspot/os_cpu
src/hotspot/share
src/hotspot/share/precompiled
src/hotspot/share/include
src/java.base/unix/native/include
@jyukutyo
jyukutyo / policy.json
Created December 4, 2018 07:25
AWS S3で特定のバケットのみアクセスを許可する
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowGroupToSeeBucketListInTheConsole",
"Action": [
"s3:ListAllMyBuckets"
],
"Effect": "Allow",
"Resource": [
@jyukutyo
jyukutyo / IntelliJOptionProblem.keylayout
Created November 21, 2018 04:46
Macの入力ソース。MacのIntelliJ IDEAでoptionを含んだショートカットで特殊文字を入力させない。mv ~/IntelliJOptionProblem.keylayout ~/Library/Keyboard\ Layouts/
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.8 on 2015-04-03 at 16:32 (GMT+9)-->
<!--Last edited by Ukelele version 2.2.8 on 2015-04-03 at 16:35 (GMT+9)-->
<keyboard group="0" id="4139" name="Emacs_beats_vi" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>
@jyukutyo
jyukutyo / CondySample.java
Created August 30, 2018 06:22
use Constant Dynamic from Byte Buddy
package com.sakatakoichi;
import java.nio.file.Paths;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.dynamic.DynamicType;
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
import net.bytebuddy.implementation.FixedValue;
import static net.bytebuddy.matcher.ElementMatchers.isDeclaredBy;
import net.bytebuddy.utility.JavaConstant;
java
--module-path=/Users/jyukutyo/code/graal/sdk/mxbuild/modules/org.graalvm.graal_sdk:/Users/jyukutyo/code/graal/truffle/mxbuild/modules/com.oracle.truffle.truffle_api.jar
--upgrade-module-path=/Users/jyukutyo/code/graal/compiler/mxbuild/modules/jdk.internal.vm.compiler
-XX:+UnlockExperimentalVMOptions
-XX:+EnableJVMCI
-XX:+UseJVMCICompiler
-XX:-TieredCompilation
-XX:+PrintCompilation
-XX:CompileOnly=IGV::average
-XX:CompileCommand=quiet
@jyukutyo
jyukutyo / gist:c6a73cb4374fecad596589417a4d7842
Created October 11, 2017 22:38
DNSレコード設定確認
dig @8.8.8.8 example.com MX