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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> | |
<property scope="context" name="pattern.singleLine.true" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z', UTC} %5p %logger [%t] \(%X{trace}\) %X{loggingMessageExtender}: %replace(%m%n%ex){'\n(?=[^$])','\\n'}%nopex" /> | |
<property scope="context" name="pattern.singleLine.false" value="%d{yyyy-MM-dd'T'HH:mm:ss.SSS'Z', UTC} -%5p %logger [%t] \(%X{trace}\) %X{loggingMessageExtender}: %m%n" /> | |
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<Pattern>${pattern.singleLine.${SINGLE_LINE_PATTERN:-false}}"</Pattern> | |
</encoder> | |
</appender> |
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
package com.github.stokito.experiments; | |
import static java.util.concurrent.TimeUnit.MILLISECONDS; | |
import static org.openjdk.jmh.annotations.Mode.Throughput; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Locale; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.Level; |
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
FILE=$(zenity --file-selection); echo $FILE; if [ -w "$FILE" ]; then pluma "$FILE"; else pkexec pluma "$FILE"; fi; |
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
Search pattern: (.*)(//)(.*)(\n) | |
Replace with: $1/\*$3 \*/$4 |
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
https://www.h-schmidt.net/FloatConverter/IEEE754.html | |
0.000030517578125 | |
0.00006103515625 | |
0.0078125 | |
0.015625 | |
0.125 | |
0.25 | |
0.5 | |
0.75 |
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
package com.github.stokito.experiments; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; | |
import org.openjdk.jmh.annotations.OutputTimeUnit; | |
import org.openjdk.jmh.annotations.Param; | |
import org.openjdk.jmh.annotations.Scope; | |
import org.openjdk.jmh.annotations.State; | |
import java.util.StringTokenizer; |
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/sh | |
# This is run once a day - don't care about performance | |
# RFC date must have GMT in the end | |
# but GNU date return +0000 instead and bb date returns UTC | |
# So we must strip +0000 or UTC and add GMT ourselves | |
DATE=$(date -R -u | sed 's/\UTC/GMT/' | sed 's/\+0000/GMT/') | |
echo "Date: $DATE\nStatus: 200\n"; |
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
FILE=example.txt | |
wget --header="If-Modified-Since:$(date -R -u -r $FILE | sed 's/\UTC/GMT/')" http://example.com/$FILE |
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
grep -H Installed-Size: /usr/lib/opkg/info/*.control | sed 's,^.*/\([^/]\+\)\.control:Installed-Size: *\(.*\),\2\t\1,' | sort -n |