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
#!/usr/bin/env bash | |
export JAVA_OPTS="--add-opens java.base/java.util=ALL-UNNAMED" | |
for i in {500..3000..500}; do | |
echo $i items | |
python3 -c 'print("val x = mapOf(" + ",".join(f"\"{i}\" to {i}" for i in range('$i')) + ")")' > /tmp/test.kt | |
time kotlinc -nowarn /tmp/test.kt | |
rm /tmp/test.kt | |
echo |
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
import java.util.PriorityQueue | |
import java.util.stream.Collector | |
import java.util.stream.Collector.Characteristics | |
fun <T : Comparable<T>> topN(n: Int) = Collector.of( | |
{ PriorityQueue<T>(n + 1) }, | |
{ queue, value: T -> | |
queue.add(value) | |
if (queue.size > 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
const withDatabase = require('../utils'); | |
describe('model.getUsers', () => { | |
it('returns all users', withDatabase([ | |
{ _table: 'user', id: 1, name: 'User 1' }, | |
{ _table: 'user', id: 1, name: 'User 1' }, | |
], async (model) => { | |
expect(model.getUsers()).toMatchObject([...]); | |
})); |
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
ab -n 32 -c 32 "http://127.0.0.1:8080/" | |
This is ApacheBench, Version 2.3 <$Revision: 1554214 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient).....done | |
Server Software: | |
Server Hostname: 127.0.0.1 |
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
Crash report begins. Anonymous machine information: | |
amd64 | |
11.1-RELEASE-p4 | |
FreeBSD 11.1-RELEASE-p4 #5 r313908+79c92265a31(RELENG_2_4): Mon Nov 20 08:18:22 CST 2017 [email protected]:/builder/ce-242/tmp/obj/builder/ce-242/tmp/FreeBSD-src/sys/pfSense | |
Crash report details: | |
No PHP errors found. |
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
Crash report begins. Anonymous machine information: | |
amd64 | |
11.1-RELEASE-p2 | |
FreeBSD 11.1-RELEASE-p2 #6 r313908+7eae9364d25(RELENG_2_4): Sun Oct 22 17:32:35 CDT 2017 [email protected]:/builder/ce-241/tmp/obj/builder/ce-241/tmp/FreeBSD-src/sys/pfSense | |
Crash report details: | |
No PHP errors found. |
This file has been truncated, but you can view the full 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
1.2.4.0/24 | |
1.2.8.0/24 | |
1.9.96.105 | |
1.9.102.251 | |
1.9.106.186 | |
1.16.0.0/14 | |
1.55.241.140 | |
1.58.181.97 | |
1.62.189.215 | |
1.62.189.216/30 |
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.reddit.com/r/apple/comments/55kqcp/apple_removed_all_the_cool_novelty_voices_from/d8bhnyw/ | |
# System Preferences > Accessibility > select Voice on the left side > System Voice menu > select Customize > select Whisper | |
cat <<EOF >> ~/.bash_profile && source ~/.bash_profile && history -d $(history | tail -n 1 | awk '{print $1}') 2> /dev/null | |
PROMPT_COMMAND='(sleep \$(( ( RANDOM % 10 ) + 1 )) && say -v Whisper "I am watching you" &)' | |
EOF |
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
#!/usr/bin/env bash | |
src="$1" | |
dst="$2" | |
find "$src" | | |
while read file; do | |
touch -c -r "$file" "$dst/${file#$src}" | |
done |
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.telendt; | |
import java.util.*; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
class MergeIterator<T extends Comparable<T>> implements Iterator<T> { |
NewerOlder