# Put a timestame in front of the prompt in the form: # Oct24 12:28[user@host MY_PWD]$ PROMPT_COMMAND=echo -ne $(date +%-b%-e […]
Veejansh
Cloud++ Container++
Cloud++ Container++
# Put a timestame in front of the prompt in the form: # Oct24 12:28[user@host MY_PWD]$ PROMPT_COMMAND=echo -ne $(date +%-b%-e […]
If you want to run an application from ssh even if you exit ssh session, do the following: # nohup […]
To know public IP of the network, use following commands on Linux shell: # curl ifconfig.co (returns IPv6 address) #curl […]
our device must be rooted. # su # toybox traceroute toybox has multiple internal commands at your perusal. This worked […]
On a rooted Android device, adb shell su -c “mount -o rw,remount /system” This makes /system writable and can update any […]
public static float cpuTemperature(){ Process process; try { process = Runtime.getRuntime().exec(“cat sys/class/thermal/thermal_zone0/temp”); process.waitFor(); BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); String line = reader.readLine(); if(line!=null) { float temp = […]
Checking double precision value for limits is tricky. Say, DOUBLE X = 1.0;IF ( X == 1.0 ) DO_SOMETHING(); This […]
Uses my_double_greater_check from earlier article DOUBLE MY_DOUBLE_ROUND( DOUBLE VAL, INT MULTIPLIER ){ DOUBLE VAL_ADJ = VAL * […]
On Android java code, print stack trace of all the threads owned by current process. try{ Map info = Thread.getAllStackTraces(); for (Map.Entry<Thread, […]