Skip to content

Instantly share code, notes, and snippets.

import "../SafeMathLib.sol";
library ERC20Lib {
using SafeMathLib for uint;
struct TokenStorage {
mapping (address => uint) balances;
mapping (address => mapping (address => uint)) allowed;
uint totalSupply;
}
library SafeMathLib {
function times(uint a, uint b) returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function minus(uint a, uint b) returns (uint) {
assert(b <= a);
return a - b;

Keybase proof

I hereby claim:

  • I am izqui on github.
  • I am ji (https://keybase.io/ji) on keybase.
  • I have a public key ASBEBu7bnegoUDr78WZspLu7GP7KiwQUeYFnuP7zjc6fBwo

To claim this, I am signing this object:

alert("Hi, this is a little vulnerability :(")
@izqui
izqui / channels.json
Created October 11, 2015 13:27
Spanish TV Channels
[
[
"1",
"sp",
"es",
"0",
"100",
"La 1",
"i_tve1.png",
"http://iphonelive.rtve.es/LA1_LV3_IPH/LA1_LV3_IPH.m3u8",
@izqui
izqui / gist:62f11cb52e63f9818e93
Created December 23, 2014 11:48
Swift Async functions
func mapParallel <A, B> (values: [A], task: ( (A, (B) -> () ) -> () ), callback:([B]) -> ()) {
let tasks: [((B) -> ()) -> ()] = values.map({
v in
return {
cb in
task(v, cb)
}
})
@izqui
izqui / godeploy
Created May 12, 2014 18:15
Deploy Go binaries to Raspberry Pi
#!/bin/sh
if [ $# -eq 0 ]
then
echo "$0 : You must provide destination host IP"
exit 1
fi
GOARCH=arm GOOS=linux go build
RET=$?
@izqui
izqui / gist:9855048
Created March 29, 2014 14:07
keybase.md
### Keybase proof
I hereby claim:
* I am izqui on github.
* I am ji (https://keybase.io/ji) on keybase.
* I have a public key whose fingerprint is 3139 7DDA D441 F0F9 EC87 539A 5EC6 4A8A 1B7C 6FD6
To claim this, I am signing this object:
@izqui
izqui / Fiware Resources
Last active December 22, 2015 05:39
Fiware Resources
Resources:
http://www.fi-ware.eu/campus-party-europedeveloping-your-first-application-workshop/
https://gist.github.com/fgalan/6422169
https://www.dropbox.com/sh/iszgi1507jqimok/3ij6bOLD7U
https://www.dropbox.com/sh/56x5caysr08zfpx/GY0sRQWzqz
http://github.com/wirecloud/wirecloud