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 net.clarenceho; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Random; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; |
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
--- | |
name: "BigDecimal explicit toString" | |
description: "find code that explicitly call BigDecimal toString" | |
condition: "resolvedMethodRef.getPackageName().toString().equals(\"java.math\") && | |
resolvedMethodRef.getClassName().toString().equals(\"BigDecimal\") && | |
node.getName().toString() == \"toString\"" | |
actions: | |
- "System.out.print(\"Cautions! Explicitly calling BigDecimal toString() in \" + file.toString()); | |
if (node.getRange().isPresent()) { | |
System.out.println(\" at \" + node.getRange().get().toString()); |
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.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Random; | |
import java.util.concurrent.ForkJoinPool; | |
import java.util.stream.IntStream; | |
public class ShufflePerformance { | |
private static final int PARALLELISM = 4; | |
private static final int LIST_SIZE = 100; |
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 | |
set -e | |
## Script to rip VCD with VLC and then transcode with ffmpeg | |
if [ "${BASH_VERSINFO}" -lt 4 ]; then | |
echo "Require bash 4 or higher" | |
exit 1 | |
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
FROM ubuntu:20.04 | |
RUN apt-get update && apt-get upgrade -y && apt-get install -y socat | |
RUN set -e -x; \ | |
groupadd -g 1337 user; \ | |
useradd -g 1337 -u 1337 -m user | |
COPY attachments/chal /home/user/ | |
COPY flag /home/user/ |
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
ROCk module is loaded | |
userx is member of video group | |
===================== | |
HSA System Attributes | |
===================== | |
Runtime Version: 1.1 | |
System Timestamp Freq.: 1000.000000MHz | |
Sig. Max Wait Duration: 18446744073709551615 (0xFFFFFFFFFFFFFFFF) (timestamp count) | |
Machine Model: LARGE | |
System Endianness: LITTLE |
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
~$ sudo lsusb -v | |
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. | |
Device Descriptor: | |
bLength 18 | |
bDescriptorType 1 | |
bcdUSB 3.20 | |
bDeviceClass 9 Hub | |
bDeviceSubClass 0 Unused | |
bDeviceProtocol 3 |
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
~$ dmesg | |
[ 0.000000] Booting Linux on physical CPU 0x0 | |
[ 0.000000] Linux version 4.9.140-tegra (buildbrain@mobile-u64-3531) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Wed Mar 13 00:32:22 PDT 2019 | |
[ 0.000000] Boot CPU: AArch64 Processor [411fd071] | |
[ 0.000000] OF: fdt:memory scan node memory@80000000, reg size 48, | |
[ 0.000000] OF: fdt: - 80000000 , 7ee00000 | |
[ 0.000000] OF: fdt: - 100000000 , 7f200000 | |
[ 0.000000] Found tegra_fbmem: 00800000@92cb6000 | |
[ 0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB | |
[ 0.000000] OF: fdt:Reserved memory: failed to reserve memory for node 'fb0_carveout': base 0x0000000000000000, size 0 MiB |
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 /proc/cpuinfo | |
processor : 0 | |
model name : ARMv8 Processor rev 1 (v8l) | |
BogoMIPS : 38.40 | |
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 | |
CPU implementer : 0x41 | |
CPU architecture: 8 | |
CPU variant : 0x1 | |
CPU part : 0xd07 | |
CPU revision : 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
package net.clarenceho.TriFib; | |
import java.util.stream.Stream; | |
import java.math.BigInteger; | |
public class FibonacciNum { | |
/** | |
* Stream of Fibonacci number in BigInteger | |
* @return stream of Fibonacci number |
NewerOlder