- In object-oriented programming, constructors aren't functions. But in PHP they are declared using
function __construct
. Weird. - No annotations/attributes! How are we supposed to provide metadata about class members?! (and no, phpdoc isn't an annotation, fuck off.)
- Namespace separators are a backslash, which means they have to be escaped in JSON and other languages.
- Why do constructors start with
__
? I've never used this key on my keyboard before. - No strict type enforcement / non-null types.
- No casting to arrays, or specific types.
- No typed variables within method signatures.
- No mixed varargs.
/*java.lang.reflect.Field[] fields = ExifInterface.class.getDeclaredFields(); | |
ArrayList<String> exifs = new ArrayList<>(); | |
for (java.lang.reflect.Field field : fields) { | |
if (java.lang.reflect.Modifier.isStatic(field.getModifiers()) && field.getType() == String.class) { | |
try { | |
System.out.println("\"" + field.get(null) + "\","); | |
} catch (IllegalAccessException e) { | |
//e.printStackTrace(); | |
} | |
} |
apply plugin: 'java' | |
apply plugin: 'application' | |
group 'nl.hypothermic' | |
version '7.1.90144-RELEASE' | |
mainClassName = 'nl.hypothermic.xanalyzer.modules.md-main.Main' | |
sourceCompatibility = 1.7 |
# copy hdd, the result will be a dynamic hdd. | |
VBoxManage clonehd ./osdisk.vdi ./osdisk-copy.vdi | |
# resize it (to 25GB in this case) | |
VBoxManage modifyhd ./osdisk-copy.vdi --resize 25000 |
Archlinux is perfect for minimal servers because it does not come with bloatware programs like other OSes (ex. centos, rhel, deb, etc) do and therefore reduces the potential attack surface. One of the biggest benefits due to Arch's rolling release cycle is that you will get security updates within hours, instead of days to months if you're using ubuntu, centos, etc. However, it must be configured in a right manner and great care must be taken on every action.
- Boot into Live ISO and switch to root user (
su
) if not already using - Create root and swap partitions on disk you want to use.
/** | |
* Tekkit Classic / Minecraft 1.3- server prototype | |
* in x86_64 assembly (nasm syntax) using linux syscalls. | |
* I've bundled this into a single file to make it easy to use. | |
* Only works on LE currently. | |
* | |
* hypothermic, 15-09-2020 | |
*/ | |
/* | |
* See included Makefile or compile using following commands: |
:: https://blog.prowling.nu/2012/09/modifying-kvm-qemu-kvm-settings-for.html | |
:: Updated for WinX by hypothermic | |
@reg copy HKLM\HARDWARE\ACPI\DSDT\BXPC HKLM\HARDWARE\ACPI\DSDT\WOOT /s /f | |
@reg delete HKLM\HARDWARE\ACPI\DSDT\BXPC /f | |
@reg copy HKLM\HARDWARE\ACPI\DSDT\WOOT\BXDSDT HKLM\HARDWARE\ACPI\DSDT\WOOT\WOOT /s /f | |
@reg delete HKLM\HARDWARE\ACPI\DSDT\WOOT\BXDSDT /f | |
sensitivity 2.4 | |
m_yaw 0.0165 | |
rate "786432" | |
fps_max "0" | |
cl_cmdrate "128" | |
cl_updaterate "128" | |
bind 4 "use weapon_c4" | |
bind q "use weapon_flashbang" |
I hereby claim:
- I am hypothermic on github.
- I am hypothermic (https://keybase.io/hypothermic) on keybase.
- I have a public key whose fingerprint is 2E23 7E9D 9ADB 1B88 505B 3488 B052 6642 ACBE 5FB0
To claim this, I am signing this object:
It took me two hours to find out that I hadn't properly initialized a dynamic array that was allocated on the stack. Valgrind is truly an awesome tool, and in conjuction with GDB it is really powerful. I will have probably forgotten how to use Valgrind in a week from now, so that's why I'm writing this quick summary on how I managed to debug the issue. I hope it's useful for future reference.