/** * Access control rules for mynetwork / rule Default { description: "Allow all participants access to all resources" participant: "ANY" operation: ALL resource: "org.acme.mynetwork." action: ALLOW } rule SystemACL { description: "System ACL to permit all access" participant: "org.hyperledger.composer.system.Participant" operation: ALL
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
/** * Access control rules for mynetwork */ | |
rule Default { | |
description: "Allow all participants access to all resources" | |
participant: "ANY" operation: ALL resource: "org.acme.mynetwork.*" | |
action: ALLOW | |
} | |
rule SystemACL { | |
description: "System ACL to permit all access" | |
participant: "org.hyperledger.composer.system.Participant" | |
operation: ALL |
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": { | |
"chainId": 0, | |
"homesteadBlock": 0, | |
"eip155Block": 0, | |
"eip158Block": 0 | |
}, | |
"alloc" : {}, | |
"coinbase" : "0x0000000000000000000000000000000000000000", | |
"difficulty" : "0x20000", |
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 ERC20Interface { | |
// Get the total token supply | |
function totalSupply() constant returns (uint256 totalSupply); | |
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
[root@node5 glusterfs-coreutils]# gfls --help | |
Usage: gfls [OPTION]... URL | |
list directory contents | |
-a, --all do not ignore entries starting with . | |
-h, --human-readable with -l, print sizes in human readable | |
format (e.g., 1K 234M 2G) | |
-l use a long listing format | |
-R, --recursive list subdirectories recursively | |
-p, --port=PORT specify the port on which to connect |
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
<%= simple_form_for ([@store, @store.delivery_preferences.build]) , :url => {:controller=>'delivery_preferences',:action=>'create'},:html=>{:class=>'delivery_preference_form'},:remote=>true do |f| %> |
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
class DeliveryPreferencesController < ApplicationController | |
before_action :set_store | |
def new | |
@delivery_preference = DeliveryPreference.new | |
end | |
def create | |
@delivery_preference = DeliveryPreference.new(delivery_preference_params) | |
@delivery_preference.store_id = @store.id |
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
class DeliveryPreferencesController < ApplicationController | |
before_action :set_store | |
def new | |
@delivery_preference = DeliveryPreference.new | |
end | |
def create | |
@delivery_preference = DeliveryPreference.new(delivery_preference_params) | |
@delivery_preference.store_id = @store.id |
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
<div class="form-group"> | |
<%= f.label :from_date, "From Date", :class => 'control-label col-md-2' %> | |
<div class="col-md-10"> | |
<%= f.text_field :from_date, :class => 'form-control date', :placeholder => "Start Date", :value => "#{ f.object.from_date.nil? ? " " : f.object.from_date.now.strftime("%m/%d/%Y")}" %> | |
</div> |
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
Celluloid needs a "Reactor" for handling collections of blocking processes such as Future.value and Condition.wait. This will allow them to call thread while also to continue processing when any of the blocking processes are available for synchronous operations to proceed. | |
Example: | |
futures = [ | |
Celluloid::Future.new { sleep 8; 3+5 }, | |
Celluloid::Future.new { sleep 3; 1+2 }, | |
Celluloid::Future.new { sleep 9; 2+7 }, | |
Celluloid::Future.new { sleep 5; 2+3 } | |
] | |
futures.map(&:value).map { |v| puts v } |