Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Azzarello lazzarello

View GitHub Profile
View dao.sol
contract SendBalance {
mapping (address => uint) userBalances;
bool withdrawn = false;
function getBalance(address u) constant returns (uint) {
return userBalances[u];
}
function addToBalance() {
userBalances[msg.sender] += msg.value;
}
View secp256k1-build.txt
root@c3a71bcefab1:/# pip install secp256k1
Collecting secp256k1
Using cached secp256k1-0.13.2.tar.gz
Requirement already satisfied: cffi>=1.3.0 in /usr/local/lib/python3.6/dist-packages (from secp256k1)
Requirement already satisfied: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi>=1.3.0->secp256k1)
Building wheels for collected packages: secp256k1
Running setup.py bdist_wheel for secp256k1 ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-hwl7dzqn/secp256k1/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp_vxftvowpip-wheel- --python-tag cp36:
0.29.1
Using bundled libsecp256k1
@lazzarello
lazzarello / quantstamp.sol
Created Jan 29, 2018
quantstamp ico contract
View quantstamp.sol
pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
uint256 c = a * b;
@lazzarello
lazzarello / proposal.md
Last active Aug 2, 2016
awesome foundation proposal
View proposal.md
View fractalpizza.py
python -c 'print (lambda r,w,h:"\n".join("".join((" ","🍕")[c]
for c in s)for s in reduce(lambda a,y:a+[[r>>(a[y][x-1]*4+a[y][x]*2+a[y][(x+
1)%w])&1for x in range(w)]],range(h),[[0]*(w/2)+[1]+[0]*(w/2)])))(90,63,31)'
View select_running_server_by_time_started.rb
require 'time'
require 'json'
(ENV.fetch("OHURI") and ENV.fetch("OHAUTH"))
min_time = Time.new(2015,05,13)
# This will automatically transform valid JSON into a Ruby data type, in this case an array of hashes. USEFUL!
all_servers = JSON.parse(`openhosting -j servers info`)
# The "type" key for a server object is misleading. Versions of the API (which
View gist:b1462ecdde9365ac6af6
apt-cache depends mysql-server-5.5 | grep Depends
# some shell crap to parse this into a list to pass to apt-get
apt-get install -y mysql-client-5.5 libdbi-perl perl libc6 libgcc1 libstdc++6 zlib1g debconf psmisc passwd lsb-base mysql-server-core-5.5 initscripts mysql-common adduser debconf heirloom-mailx libhtml-template-perl
apt-get -d mysql-server-5.5
dpkg --unpack /var/cache/apt/archives/mysql-server-5.5_5.5.38-0+wheezy1_amd64.deb
# do your crazy configuration stuff here
dpkg --configure mysql-server-5.5
@lazzarello
lazzarello / keybase.md
Created Jun 12, 2014
i wrote this so i'm proof
View keybase.md

Keybase proof

I hereby claim:

  • I am lazzarello on github.
  • I am pizza (https://keybase.io/pizza) on keybase.
  • I have a public key whose fingerprint is D16F 04E9 2868 8169 B640 88D5 A84B F48A 12CA 3765

To claim this, I am signing this object:

@lazzarello
lazzarello / gist:9907438
Last active Aug 29, 2015
dark souls ladle only build
View gist:9907438
Pick Sorcerer, for magic weapon to cast on ladle, as it gets broken really easy with a durability of 10. Take human effigy as gift. Use the dagger or sorcery at first beacuse the ladle has a base strength of 6 and the class starts with 3. Kill hippos because we need souls to get resins to buff the ladle because it does damage even when it is broken. Get bonfire ascetic and burn it at the first bonefire in Heide castle so you can cheese Dragon Rider twice for moar souls to level up. Reinforce ladle to +3. First Heide knight can fall off, near the bonefire for souls, second can fall for Sublime Bone Dust.
Go to no man's wharf and but magic weapon from the sorcerer dude. Get a fragrant branch of yore, unpetrify the pyro lady so you can buy charcoal resin. Go to second bonefire in forest of giants and talk to undead merchant, but the blacksmith key, talk to her so she goes back to maluja and sells gold pine resin.
You will need a lot of repair powder and the repair spell.
View test.sh
#!/bin/bash
echo "Hello World!"
You can’t perform that action at this time.