This file contains hidden or 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
Host * | |
AddKeysToAgent yes | |
ForwardAgent yes | |
HostKeyAlgorithms +ssh-rsa | |
KexAlgorithms +diffie-hellman-group1-sha1 | |
LogLevel QUIET | |
PubkeyAcceptedKeyTypes +ssh-rsa | |
ServerAliveCountMax 10 | |
ServerAliveInterval 30 | |
StrictHostKeyChecking no |
This file contains hidden or 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 re | |
def get_cpu_count(): | |
cpu_count = 0 | |
cpu_file = '/proc/cpuinfo' | |
ch = open(cpu_file, 'r') | |
for line in ch: | |
if re.match('processor', line): | |
cpu_count = cpu_count + 1 | |
ch.close() |
This file contains hidden or 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
// exit code 0 if JCE is available, 1 otherwise | |
/* | |
* one-liner: | |
* jrunscript -e 'exit (javax.crypto.Cipher.getMaxAllowedKeyLength("AES") < 256);' | |
*/ | |
import javax.crypto.Cipher; | |
public class jcecheck { |
This file contains hidden or 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
/* | |
* single command version: | |
* jrunscript -e 'java.lang.System.getProperties().list(java.lang.System.out);' | |
*/ | |
import java.util.Properties; | |
public class jsysprop { | |
public static void main(String[] args) { | |
System.getProperties().list(System.out); |
This file contains hidden or 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
(define (myabs x) | |
(cond ((< x 0) (* x -1)) | |
((x >= 0) (* x 1)))) | |
(define (myexpt x y) | |
(cond ((< x 0) (* (cond ((odd? (myabs y)) -1) | |
(else 1)) | |
(myexpt (myabs x) y))) | |
((< y 0) (/ 1 (myexpt x (myabs y)))) | |
((= y 0) 1) |
NewerOlder