Skip to content

Instantly share code, notes, and snippets.

View austintgriffith's full-sized avatar
💭
:bowtie:

Austin Griffith austintgriffith

💭
:bowtie:
View GitHub Profile
@austintgriffith
austintgriffith / dockerdemo.txt
Last active November 13, 2015 22:00
Docker Demo
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.
@austintgriffith
austintgriffith / testRedis.php
Created July 28, 2016 13:20
Php file to test the predis connection
<?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',
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
.com.ac
.edu.ac
.gov.ac
.net.ac
.mil.ac
.org.ac
.nom.ad
.net.ae
.gov.ae
.org.ae
pragma solidity ^0.4.11;
import "Simple.sol";
contract Adjuster {
address public owner;
function Adjuster() {
owner = msg.sender;
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;
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;
pragma solidity ^0.4.11;
contract Predecessor is Ownable{
function Predecessor() {}
address public descendant;
function setDescendant(address _descendant) onlyOwner {
descendant=_descendant;
}
}
//
// 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...")
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;