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
Create a new folder on your machine and then create a file in there called "Dockerfile" | |
Inside that file we will add a single line: | |
"FROM ubuntu:latest" | |
That tells docker to create our image from the latest ubuntu. | |
In that directory run "docker build -t demo ." to build it. |
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
<?php | |
echo "Loading autoloader..."; | |
require '/var/www/vendor/autoload.php'; | |
echo "Registering predis..."; | |
Predis\Autoloader::register(); | |
echo "Creating client..."; | |
// Parameters passed using a named array: | |
$client = new Predis\Client([ | |
'scheme' => 'tcp', |
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
hs.hotkey.bind({"shift", "ctrl","cmd"}, "Q", function() | |
local win = hs.window.focusedWindow() | |
local f = win:frame() | |
local screen = win:screen() | |
local max = screen:frame() | |
f.x = max.x | |
f.y = max.y + max.h / 6 | |
f.w = max.w / 2 | |
f.h = max.h * 5/6 |
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
.com.ac | |
.edu.ac | |
.gov.ac | |
.net.ac | |
.mil.ac | |
.org.ac | |
.nom.ad | |
.net.ae | |
.gov.ae | |
.org.ae |
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.11; | |
import "Simple.sol"; | |
contract Adjuster { | |
address public owner; | |
function Adjuster() { | |
owner = msg.sender; |
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.11; | |
import 'zeppelin-solidity/contracts/ownership/Ownable.sol'; | |
contract Inherit is Ownable { | |
string public message; | |
function Inherit(string _message) { | |
message = _message; |
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.11; | |
contract Store is Ownable, Predecessor { | |
//string to hold source url of price information for reference | |
string public source; | |
//prices mapped by SYMBOL => price in USD | |
mapping (bytes32 => uint) price; |
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.11; | |
contract Predecessor is Ownable{ | |
function Predecessor() {} | |
address public descendant; | |
function setDescendant(address _descendant) onlyOwner { | |
descendant=_descendant; | |
} | |
} |
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
// | |
// usage: node contract minePrice Store null #SYMBOL# | |
// | |
// ex: node contract minePrice Store null BTC,ETH,XRP,BCH,LTC | |
// | |
const SHIFT = 1000000000000//shift price from float to uint | |
const Request = require('request'); | |
let ACCOUNT_INDEX = 1 | |
module.exports = (contract,params,args)=>{ | |
console.log("**== loading source from contract...") |
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.11; | |
/* | |
A simple 'request oracle client' that needs to know the price of Eth and Bch | |
*/ | |
contract EthVsBch { | |
//string to hold source address of oracle | |
address public source; |
OlderNewer