Skip to content

Instantly share code, notes, and snippets.

View test_openjfx.sh
#!/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 Feb 13, 2021
NixOS configuration for MinIO (#67684)
View configuration.nix
{ 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;
View FingerTree.swift
indirect enum FingerTree<T> {
case Empty,
Single(_ value: T),
Deep(
left: Digit<T>,
child: FingerTree<Node<T>>,
right: Digit<T>
)
}
View revert_autopatchelf.patch
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
View swift-xdotool-test.sh
#!/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
View swift-4.2.3-error.txt
$ 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
View swift-mode_pull_146.swift
enum Foo {
case north, south, east, west
case foo(Int), bar(Int)
case foo(Int)
case foo = 1
func foo() {
switch self {
case .foo:
case .foo(let x):
View swift-mode_pull_145.swift
foo.sort {
}
foo .sort {
}
foo.sort()
foo .sort()
sort {
}
@taku0
taku0 / AOTSample.java
Created Oct 6, 2017
Sample program for AOT for JDK 9
View AOTSample.java
// javac AOTSample.java
// jaotc *.class
// time java AOTSample
// time java -XX:AOTLibrary=./unnamed.so AOTSample
public class AOTSample {
public static class Cons<T> {
private final T value;
private final Cons<T> next;
View A.java
class A {
final int x = 1;
public boolean foo() {
return "a2" == ("a" + (x + 1));
}
}