Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/usr/bin/env bash | |
GEMS=$(cat <<EOF | |
childprocess-0.5.8.gem | |
ffi-1.9.10.gem | |
little-plugger-1.1.4.gem | |
micromachine-1.1.0.gem | |
multi_json-1.11.1.gem | |
net-ssh-2.9.2.gem | |
rest-client-1.6.9.gem |
function Add-EnvPath { | |
param( | |
[Parameter(Mandatory=$true)] | |
[string] $Path, | |
[ValidateSet('Machine', 'User', 'Session')] | |
[string] $Container = 'Session' | |
) | |
if ($Container -ne 'Session') { |
// | |
// The new assembly support in Solidity makes writing helpers easy. | |
// Many have complained how complex it is to use `ecrecover`, especially in conjunction | |
// with the `eth_sign` RPC call. Here is a helper, which makes that a matter of a single call. | |
// | |
// Sample input parameters: | |
// (with v=0) | |
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad", | |
// "0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf200", | |
// "0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a" |
/* | |
Usage: | |
1. Account owner sends a request for verification, in this request he sends a fingerprint of his OpenPGP key stored on cryptonomica.net | |
2. This contracts sends back a string to sign | |
3. Accont owener signs this strign with his OpenPGP key and sends back to smartcontract. | |
4. Information about verification is public visible - who needs to check can download verified public key from cryptonomica.net and check if owner of stated Ehereum acconts is also known owner of verified OpenPGP key on cryptonomica.net | |
It's also possible to create a web-inerface using Cryptonomica's API like: |
/* | |
This smartcontract is used to store documents text on the Ethereum blockchain | |
and to get the document by document's hash (sha256). | |
*/ | |
contract ProofOfExistence{ | |
/* ---- Public variables: */ | |
string public created; |
If you hate git submodule
, then you may want to give git subtree
a try.
When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add
command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.
When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.
Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:
pragma solidity ^0.4.15; | |
contract StringsAndBytes { | |
/* --- public variables for storing tests results */ | |
string public lastTestStringResult; // | |
bytes32 public lastTestBytes32Result; // | |
bytes public lastTestBytesResult; // bytes: dynamically-sized byte array | |
bool public lastTestBoolResult; // |
pragma solidity ^0.4.19; | |
contract GuessGame2 { | |
mapping(address => uint) ans; | |
mapping(address => address) opp; | |
mapping(address => uint) bal; | |
address unmatched_player; | |
/** | |
* Constructs funcion. |
//THIS CONTRACT IS CONSUMING A LOT OF GAS | |
//THIS CONTRACT IS ONLY FOR DEMONSTRATING HOW RANDOM NUMBER CAN BE GENERATED | |
//DO NOT USE THIS FOR PRODUCTION | |
pragma solidity ^0.4.8; | |
contract Lottery { | |
mapping (uint8 => address[]) playersByNumber ; |