Skip to content

Instantly share code, notes, and snippets.

@4adamu
4adamu / AdamsToken
Last active June 19, 2018 08:00
my sample of Ethereum erc20 token
pragma solidity ^0.4.18;
// ----------------------------------------------------------------------------
// 'Adams' token contract //"change here"
//
// Deployed to : 0x8b0D0440427411737B0a209D225e5157B3AcD809 //"change here"
// Symbol : ADAMS //"change here"
// Name : Adams Token //"change here"
// Total supply: 1000000 //"change here"
// Decimals : 18
@4adamu
4adamu / 0-react-hello-world.md
Created August 24, 2017 01:05 — forked from danawoodman/0-react-hello-world.md
React Hello World Examples

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

@4adamu
4adamu / gist:76acb1f9662f8141543e9aba2412e0f9
Created May 31, 2017 08:11 — forked from manniru/gist:ae5edf7ad8ee4206aefdc6fa7328f390
Most popular D7 modules (as of July 16, 2015)
SELECT n.title, SUM(w.count) as total
FROM project_usage_week_release w
INNER JOIN field_data_field_release_project r ON w.nid = r.entity_id
INNER JOIN node n ON n.nid = r.field_release_project_target_id
INNER JOIN
field_data_field_release_version v ON v.entity_id = r.entity_id
WHERE LEFT(v.field_release_version_value, 3) = '7.x'
AND FROM_UNIXTIME(w.timestamp) BETWEEN CURDATE()-INTERVAL 2 WEEK AND CURDATE()
GROUP BY n.title
ORDER BY total DESC;
@4adamu
4adamu / 0_reuse_code.js
Created February 26, 2017 17:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@4adamu
4adamu / fakeid.py
Created May 21, 2016 05:01 — forked from hugsy/fakeid.py
Fake ID generator
import requests
import BeautifulSoup
import sys
import time
class RandomPerson:
def __init__(self):
bs = BeautifulSoup.BeautifulSoup(self.get_text())
d = bs.find("div", "address")