echo "limit maxfiles 1024 unlimited" | sudo tee -a /etc/launchd.conf
git clone https://github.com/mholt/caddy.git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function a() { | |
for file in "$1"/* | |
do | |
if [ ! -d "${file}" ] ; then | |
asciidoctor "${file}" | |
else | |
traverse "${file}" | |
fi | |
done |
#!/usr/bin/env bash
executingPath=$(pwd)
scriptPath=$(cd $(dirname $0);pwd)
scriptParentPath=$(cd $(dirname $0);cd ..; pwd)
scriptName=$(basename $0)
line=$(printf "%-60s")
echo "${line// /#}"
echo "Executing path : $executingPath"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╰─○ cat .gitconfig | |
[user] | |
name = 六翁 | |
email = lu.hl@***.com | |
[push] | |
default = matching | |
[core] | |
autocrlf = input | |
[color] | |
ui = auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
╰─○ cat .gitconfig | |
[user] | |
name = 六翁 | |
email = lu.hl@***.com | |
[push] | |
default = matching | |
[core] | |
autocrlf = input | |
[color] | |
ui = auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void test() throws InterruptedException, ExecutionException { | |
ForkJoinPool customThreadPool = new ForkJoinPool(8); | |
ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat("pool-%d").build(); | |
ThreadPoolExecutor executor = new ThreadPoolExecutor(5, Integer.MAX_VALUE, | |
1, TimeUnit.MINUTES, | |
new LinkedBlockingQueue<>(5), | |
threadFactory, | |
new ThreadPoolExecutor.AbortPolicy()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using exclusive or self-inverse to find the repeated number in an array | |
// Self-inverse: A ⊕ A = 0 | |
// A XOR B XOR B = A XOR 0 = A | |
int[] a1 = {1, 2, 3, 3}; | |
int[] a2 = {1, 2, 2, 3}; | |
int x1 = a1[0] ^ a1[1] ^ a1[2] ^ a1[3] ^ 1 ^ 2 ^ 3; | |
int x2 = a2[0] ^ a2[1] ^ a2[2] ^ a2[3] ^ 1 ^ 2 ^ 3; | |
System.out.println(x1); | |
System.out.println(x2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>org.springframework.boot</groupId> | |
<artifactId>spring-boot-starter-rsocket</artifactId> | |
<version>${spring-boot.version}</version> | |
<exclusions> | |
<exclusion> | |
<groupId>io.netty</groupId> | |
<artifactId>netty-buffer</artifactId> | |
</exclusion> | |
<exclusion> |
OlderNewer