pragma solidity ^0.4.11;
contract Simple {
bytes32 public v;
function set(bytes32 _v) {
v = _v;
}
This file contains 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
#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; |
This file contains 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
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" |
This file contains 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
package main | |
import ( | |
"crypto/rand" | |
"flag" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"os" | |
"sync" |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <openssl/rand.h> | |
#include <zlib.h> | |
#include <math.h> | |
#include <arpa/inet.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> |
This file contains 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
#!/bin/bash | |
function killswarm { | |
kill -TERM $1 | |
exit 1 | |
} | |
# take the newest key if none is given | |
function latest_key { | |
echo -n `find $1/keystore -regex ".*--[a-fA-F0-9].*" | sort -r | head -n1 | sed -e 's/.*Z--\([a-fA-F0-9]*\)$/\1/g'` |
This file contains 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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"flag" | |
"fmt" | |
"math/big" | |
"os" | |
"os/user" |
https://github.com/juj/emsdk @ 2324e5d8
LLVM_CMAKE_ARGS="-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly" emsdk install sdk-tag-1.37.28-64bit
(be patient!)
To activate correct paths for emscripten and dependencies use:
./emsdk activate sdk-tag-1.37.28-64bit
./emsdk_env.sh
This file contains 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
#!/bin/bash | |
UID=$1 | |
iptables -A OUTPUT -t mangle -m owner --uid-owner $UID -j MARK --set-mark 6 | |
tc qdisc add dev enp2s0 root handle 1: htb default 30 | |
tc class add dev enp2s0 parent 1: classid 1:1 htb rate 6mbit burst 15k | |
tc class add dev enp2s0 parent 1: classid 1:2 htb rate 1mbit burst 15k | |
tc filter add dev enp2s0 protocol ip parent 1:0 prio 1 handle 6 fw flowid 1:2 |
This file contains 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
package hasher | |
import ( | |
"encoding/binary" | |
"math/rand" | |
"strconv" | |
"strings" | |
"sync" | |
"testing" |
OlderNewer