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
module MyExtension | |
def [](index) | |
#this works in iOS but in OSX self is treted as a Fixnum | |
self.indexAtPosition(index) | |
end | |
end | |
class NSIndexPath | |
include MyExtension | |
end |
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 | |
# v.1.0.8 (for PoC5 RC15+) | |
# SLOLI | |
# Super Lazy One Line Install (tm), or SLOLI, is for OSX Mavericks ONLY | |
# If you spot inefficiencies they are there for a reason (edge cases, supporting previously aborted installs, etc) | |
# INSTALL | |
# This script will install the GoLang implementation of ethereum, including: | |
# - brew |
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
contract CollectFunds { | |
address owner; | |
uint startTime; | |
uint minimalValue; | |
function CollectFunds(uint minimum) { | |
owner = msg.sender; | |
startTime = now; | |
minimalValue = minimum; | |
} |
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
contract Namecoin { | |
uint registrationCost; | |
mapping (string => string) public domains; | |
function Namecoin(uint _cost) { | |
registrationCost = _cost; | |
} | |
function register(string _domainName, string _ip) { | |
if (msg.value < registrationCost) throw; |
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
pragma solidity ^0.4.8; | |
contract Token { | |
event Transfer(address indexed from, address indexed to, uint value); | |
event Approval( address indexed owner, address indexed spender, uint value); | |
mapping( address => uint ) _balances; | |
mapping( address => mapping( address => uint ) ) _approvals; | |
uint public _supply; | |
function Token( uint initial_balance ) { |
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
{ | |
"contracts": ["app/contracts/**"], | |
"app": { | |
"css/app.css": ["app/css/**"], | |
"js/app.js": ["embark.js", "app/js/**"], | |
"index.php": "app/index.php" | |
}, | |
"buildDir": "dist/", | |
"config": "config/", | |
"plugins": {} |
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
// config/contracts.js | |
module.exports = { | |
"testnet": { | |
"deployment": { | |
"accounts": [ | |
{ | |
"privateKey": "your_private_key" | |
}, | |
{ | |
"privateKeyFile": "path/to/file" // You can put more than one key, separated by , or ; |
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
const SimpleStorage = embark.require('Embark/contracts/SimpleStorage'); | |
let accounts; | |
config({ | |
// note: accounts is optional | |
accounts: [ | |
{ mnemonic: "a 12 word mnemonic", "balance": "5 ether"} | |
] | |
contracts: { | |
"SimpleStorage": { |
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
// config/contracts.js | |
module.exports = { | |
"development": { | |
"deployment": { | |
"accounts": [ | |
{ | |
"mnemonic": "12 word mnemonic", | |
"balance": "5 ether" | |
} | |
] |
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
import * as Contracts from 'embark/contracts' | |
import { SimpleStorage } from "embark/contracts" | |
import SimpleStorage from 'embark/contracts/SimpleStorage' |
OlderNewer