Skip to content

Instantly share code, notes, and snippets.

def parse_cpu_info():
cpu = {}
for line in open("/proc/cpuinfo"):
if ':' in line:
k, v = line.split(":", 1)
k = k.strip()
v = v.strip()
cpu[k] = v
if not line.strip():
@nogweii
nogweii / Test.java
Created October 1, 2013 23:39
A quick test to see if you have the JCE Unlimited Strength Jurisdiction Policy files installed. If you don't, in Java 6 you'll see 128. If you do, you'll see 2147483647. Thanks to http://stackoverflow.com/questions/11538746/check-for-jce-unlimited-strength-jurisdiction-policy-files
import javax.crypto.Cipher;
class Test {
public static void main(String[] args) {
try {
System.out.println("Hello World!");
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES");
System.out.println(maxKeyLen);
} catch (Exception e){
System.out.println("Sad world :(");