Skip to content

Instantly share code, notes, and snippets.

💭
ねむい

mike_neck mike-neck

💭
ねむい
Block or report user

Report or block mike-neck

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View build.gradle
plugins {
id 'java-library'
}
repositories {
mavenCentral()
}
dependencies {
api 'org.slf4j:slf4j-api:1.7.12'
View pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.bom</groupId>
<artifactId>generator</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>example bill of material</name>
<dependencyManagement>
@mike-neck
mike-neck / build.gradle
Created Jun 19, 2019
BOM を吐き出す
View build.gradle
plugins {
id 'java-platform'
id 'maven-publish'
}
repositories {
mavenCentral()
}
dependencies {
@mike-neck
mike-neck / build.gradle
Created Jun 18, 2019
maven-publish plugin で bom 出力
View build.gradle
plugins {
id 'maven-publish'
}
repositories {
mavenCentral()
}
configurations {
pom
View build.gradle
plugins {
id 'java'
id 'war'
}
repositories {
mavenLocal()
mavenCentral()
}
@mike-neck
mike-neck / memo.md
Last active May 20, 2019
build project loom on ubuntu on docker
View memo.md
sed -i -e "s/^#[[:space:]]//g" /etc/apt/sources.list
apt-get update
apt-get install -y build-essential mercurial zip unzip autoconf curl libx11-dev libxext-dev libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev libfontconfig1-dev libasound2-dev
curl -s "https://get.sdkman.io" | bash
source "/root/.sdkman/bin/sdkman-init.sh"

mkdir /work
cd /work
hg clone http://hg.openjdk.java.net/loom/loom/
View red-black-tree.go
package main
import (
"fmt"
"strings"
)
type Ord int
const (
@mike-neck
mike-neck / Scratch.java
Created May 13, 2019
しかたがないにゃ〜
View Scratch.java
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
class Scratch {
public static void main(final String[] args) {
final InputStream inputStream = new ByteArrayInputStream("foo,\nbar,\n,baz".getBytes(StandardCharsets.UTF_8));
final String string = toString(inputStream);
View jmh-result.txt
Benchmark Mode Cnt Score Error Units
c.e.list.ArrayList10000.listAdd thrpt 16 15.398 ± 0.118 ops/ms
c.e.list.ArrayList10000.listGet thrpt 16 52.297 ± 2.338 ops/ms
c.e.list.ArrayList10000.listInsert thrpt 16 6.930 ± 0.076 ops/ms
c.e.list.ArrayList10000.listIteration thrpt 16 75.450 ± 1.338 ops/ms
c.e.list.ArrayList10000.listRemove thrpt 16 15.037 ± 0.130 ops/ms
c.e.list.LinkedList10000.listAdd thrpt 16 13.765 ± 0.450 ops/ms
c.e.list.LinkedList10000.listGet thrpt 16 0.299 ± 0.003 ops/ms
View AddOperation.java
package com.example;
import org.openjdk.jmh.annotations.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.function.Consumer;
import java.util.stream.Stream;
You can’t perform that action at this time.