Skip to content

Instantly share code, notes, and snippets.

View nolash's full-sized avatar

lash nolash

View GitHub Profile
@nolash
nolash / dpabig.go
Created November 28, 2017 19:31
swarm dpa bigfile test
package main
import (
"crypto/rand"
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"sync"
@nolash
nolash / fusebzz.go
Created October 14, 2017 16:58
Simple fuse mount and umount
package main
import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/swarm/api"
"github.com/ethereum/go-ethereum/swarm/fuse"
"github.com/ethereum/go-ethereum/swarm/storage"
"io/ioutil"
"os"
"os/signal"
@nolash
nolash / gist:62e6c872ec126594359d20cbe26cd3aa
Last active September 6, 2020 21:46
solidity contract disassembly interpretation

contract

pragma solidity ^0.4.11;

contract Simple {
	bytes32 public v;
	function set(bytes32 _v) {
		v = _v;
	}
@nolash
nolash / floatreassemble.c
Created June 3, 2017 14:10
Deconstructing and reconstructing a IEEE 754 float
#include <stdio.h>
#include <limits.h>
#include <math.h>
float simple(float n, int ii) {
printf("simple original float: %f %x\n", n, *((unsigned int*)&n));
float a = (float)(int)n;
float b = n - a;
float c = (float)ii + b;