Skip to content

Instantly share code, notes, and snippets.

@youfoundron
youfoundron / 0.2.1-boggle_class_from_methods.rb
Created January 8, 2014 22:20 — forked from dbc-challenges/0.2.1-boggle_class_from_methods.rb
phase 0 unit 2 week 1 boggle class challenge
class BoggleBoard
def initialize(board) # takes nested array and sets it to board attribute
@board = board
end
def create_word(*coords) # takes multiple arrays (representing individual coordinates), return string of the joined elements at the given coordinates
coords.map { |coord| @board[coord.first][coord.last]}.join("") # splat operator '*' let's the method take multiple paramaters as an array
end
def get_letter(row, col) # takes index of row, index of column; returns letter at coordinate
@youfoundron
youfoundron / introrx.md
Created September 17, 2016 23:01 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@youfoundron
youfoundron / lldb-basics.md
Created November 17, 2016 18:45
lldb basics

#LLDB Basics A basic overview of lldb for personal reference.
Official documentation can be found here here.

##Command Structure General syntax

<noun> <verb> [-options [option-value]] [argument [argument...]]
@youfoundron
youfoundron / UserManager.sol
Created August 18, 2017 22:26
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.15+commit.bbb8e64f.js&optimize=undefined&gist=fb150e424d4d5ecadda85ffa4ddd8d6b
pragma solidity ^0.4.11;
contract UserManager {
address public owner;
uint public numUsers = 0;
mapping(address => address) private linkedUsers;
modifier onlyOwner {
require(msg.sender == owner);
_;
@youfoundron
youfoundron / UserManager.sol
Created August 19, 2017 16:48
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-v0.4.15+commit.bbb8e64f.js&optimize=undefined&gist=3a7d92ae197b19c82b023d90ab6bbb56
pragma solidity ^0.4.11;
contract UserManager {
address public owner;
address[] public users;
mapping(address => uint) userIndexes;
modifier onlyOwner {
require(msg.sender == owner);
_;
Verifying my Blockstack ID is secured with the address 15qE9yMvv9P6q3y1r3b6tTsr98idSWRQjX
@youfoundron
youfoundron / Token Distribution Tool
Last active November 23, 2017 18:55
Feature description of a token distribution tool.
## Overview
The simplest structure of a token sale consists of a sale contract and token contract.
The sale contract is responsible for such logic including but not limited to:
- the duration of the sale (typically in blocks)
- the addresses allowed to participate in the sale
- the exchange rate of ether to tokens, often as a factor of time
- the ether reserve and hard cap amounts
The token contract is responsible for such logic including but not limited to:

Keybase proof

I hereby claim:

  • I am youfoundron on github.
  • I am youfoundron (https://keybase.io/youfoundron) on keybase.
  • I have a public key ASBI-xWkqXWXdT8KB9Nnove3rLfCgCFlXm4TyU12087Q1Ao

To claim this, I am signing this object:

@youfoundron
youfoundron / MyRestrictedToken.sol
Created July 27, 2018 19:09
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.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity 0.4.24;
import './SimpleRestrictedToken.sol';
contract MyRestrictedToken is SimpleRestrictedToken {
string public name;
string public symbol;
uint public decimals;
uint public totalSupply;
@youfoundron
youfoundron / InvestorTypesToken-Explained.md
Created November 21, 2018 18:05
ERC-1404: When Investors Can’t Trade -- Example Code

InvestorTypesToken.sol Explained

Draft