Skip to content

Instantly share code, notes, and snippets.

View zctocm's full-sized avatar
🎯
Focusing

CZ zctocm

🎯
Focusing
View GitHub Profile
@veox
veox / erc20.abi.json
Created January 21, 2018 14:59
ERC20 ABI in JSON format
[
{
"constant": true,
"inputs": [],
"name": "name",
"outputs": [
{
"name": "",
"type": "string"
}
@tomconte
tomconte / web3-solc-contract-compile-deploy.js
Created December 13, 2016 09:32
Compiling and deploying an Ethereum Smart Contract, using solc and web3.
const fs = require('fs');
const solc = require('solc');
const Web3 = require('web3');
// Connect to local Ethereum node
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545"));
// Compile the source code
const input = fs.readFileSync('Token.sol');
const output = solc.compile(input.toString(), 1);
@Erichain
Erichain / msconvert.js
Last active December 25, 2023 19:15 — forked from remino/msconvert.js
JavaScript: Convert milliseconds to object with days, hours, minutes, and seconds
function convertMS( milliseconds ) {
var day, hour, minute, seconds;
seconds = Math.floor(milliseconds / 1000);
minute = Math.floor(seconds / 60);
seconds = seconds % 60;
hour = Math.floor(minute / 60);
minute = minute % 60;
day = Math.floor(hour / 24);
hour = hour % 24;
return {
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->
@oodavid
oodavid / README.md
Last active April 6, 2024 18:45 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/