Skip to content

Instantly share code, notes, and snippets.

Avatar

Lee Azzarello lazzarello

View GitHub Profile
View aggregate_wlan0_up.rb
#!/usr/bin/ruby -w
require 'rubygems'
require 'RRD'
rrd = "/var/lib/munin/localdomain/localhost.localdomain-if_wlan0-up-c.rrd"
start = Time.now.to_i
# extract four variables with corresponding values from the rrd data
# data is some mysterious number, usually 42
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 / lockdownd
Created Nov 13, 2012
lockdownd logs from xcode on an unlocked iphone 5
View lockdownd
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 lookup_baseband_info_new: throwing some postponement into ark, radio status: kCTPostponementStatusReady
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 load_activation_records: This is the default record
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 determine_activation_state_new: Original act. state: Activated
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 determine_activation_state_new: CT Postponement status: kCTPostponementStatusReady
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 deliver_baseband_ticket: Delivered Ticket
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 determine_activation_state_new: Activation state now is Activated
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 lookup_baseband_info_new: throwing some postponement into ark, radio status: kCTPostponementStatusActivated
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 load_activation_records: This is the default record
Nov 13 10:10:33 lockdownd[29] <Notice>: 3ae76b78 dete
@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)'
@lazzarello
lazzarello / gist:4027073
Created Nov 6, 2012
csipsimple build error
View gist:4027073
-compile:
[javac] Compiling 247 source files to /home/twelvetone/src/CSipSimple/bin/classes
[javac] /home/twelvetone/src/CSipSimple/src/com/csipsimple/utils/CustomDistribution.java:73: package R does not exist
[javac] R.drawable.ic_wizard_ostn, 10,
[javac] ^
[javac] /home/twelvetone/src/CSipSimple/src/com/csipsimple/utils/CustomDistribution.java:74: cannot find symbol
[javac] symbol : class Locale
[javac] location: class com.csipsimple.utils.CustomDistribution
[javac] new Locale[]{ }, true, false,
[javac] ^
View gist:3914702
<include>
<!-- Preprocessor Variables
These are introduced when configuration strings must be consistent across modules.
NOTICE: YOU CAN NOT COMMENT OUT AN X-PRE-PROCESS line, Remove the line instead.
WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
YOU SHOULD CHANGE THIS default_password value if you don't want to be subject to any
toll fraud in the future. It's your responsibility to secure your own system.
View gist:2726964
</gateway>
<gateway name="tanstagi.net">
<param name="username" value="xxxxx"/>
<param name="password" value="xxxxxxxxxxxx"/>
<param name="extension" value="Local_Extension"/>
<param name="register-transport" value="tls"/>
<param name="contact-params" value="transport=tls"/>
</gateway>