Skip to content

Instantly share code, notes, and snippets.

@laerciobernardo
laerciobernardo / hexIEEEtoFloat.js
Last active January 21, 2024 14:48
Convert Hexadecimal IEEE754 to Float in Javascript
var str = '0x41FC6733';
function parseFloat(str) {
var float = 0, sign, order, mantiss,exp,
int = 0, multi = 1;
if (/^0x/.exec(str)) {
int = parseInt(str,16);
}else{
for (var i = str.length -1; i >=0; i -= 1) {
if (str.charCodeAt(i)>255) {
@rstump
rstump / clonezilla_img
Created August 2, 2011 03:24
Creating a .img file from a Clonezilla backup
ryanstump@wubuntu:sudo apt-get update
ryanstump@wubuntu:sudo apt-get install partclone
ryanstump@wubuntu:/mnt/src$ touch /destination/sde2.img
ryanstump@wubuntu:/mnt/src$ sudo cat 2011-07-31-11-img/sda3.ntfs-ptcl-img.gz.* |sudo gzip -d -c | sudo partclone.restore -C -s - -O /destination/sde2.img