Skip to content

Instantly share code, notes, and snippets.

View rgottleber's full-sized avatar
💭
🤙

Richard Gottleber rgottleber

💭
🤙
View GitHub Profile
@rgottleber
rgottleber / contracts...Ownable.sol
Created August 28, 2021 20:37
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
pragma solidity ^ 0.4.18;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
@rgottleber
rgottleber / contracts...SimpleCoin.sol
Created August 28, 2021 19:12
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
pragma solidity ^0.4.0;
contract SimpleCoin {
mapping (address => uint256) public coinBalance;
// Allowance is used to limit the number of coins an address can
// use in transferFrom
mapping (address => mapping (address => uint256)) public allowance;
mapping (address => bool) public frozenAccount;
address public owner;
@rgottleber
rgottleber / contracts...SimpleCoin.sol
Created August 28, 2021 02:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.26+commit.4563c3fc.js&optimize=false&runs=200&gist=
pragma solidity ^0.4.0;
contract SimpleCoin {
mapping (address => uint256) public coinBalance;
mapping (address => mapping (address => uint256)) public allowance;
mapping (address => bool) public frozenAccount;
address public owner;
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenAccount(address target, bool frozen);
#include <stdio.h>
#include <stdbool.h>
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* *
* This program demonstrates how subscripted variables are used *
* It uses 2 variables: *
* matrix[10] - a 10 element subscripted variable *
* also known as an array. The index *
* values go from 0 -9. *
rake new_post # You can't use the format new_post["Title"] in zsh
vi {file_name_from_new_post}
rake generate
rake deploy
git add .
puts "Hello World"