git submodule add git@mygithost:project lib/projectcd lib/project && git pull && cd ../.. && git commit -a -m 'update submodule'| const express = require('express'); | |
| const app = express(); | |
| // Routes | |
| app.get('/', (req, res) => { | |
| res.send('Hello World!'); | |
| }); | |
| // Listen | |
| const port = process.env.PORT || 5000; |
| function r(l=32){var r="",a='abcdefghijklmnopqrstuvwxyz',c=a.toUpperCase()+a+'0123456789';for(var i=0; i<l; i++)r+=c.charAt(Math.floor(Math.random()*c.length));return r;} |
| import BigNumber from "bignumber.js"; | |
| export function random() { | |
| return BigNumber.random().toString(); | |
| } | |
| export function toFixed(value, decimals) { | |
| return new BigNumber(`${value}`).toFixed(decimals).toString(); | |
| } |
I hereby claim:
To claim this, I am signing this object:
| import React, { Component } from 'react'; | |
| function windowResize(WrappedComponent) { | |
| return class extends Component { | |
| state = { | |
| width: '', | |
| height: '' | |
| }; | |
| updateDimensions = () => { | |
| const w = typeof window !== 'undefined' ? window : ''; |
https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
contract ERC20 {
function totalSupply() constant returns (uint theTotalSupply);
function balanceOf(address _owner) constant returns (uint balance);
function transfer(address _to, uint _value) returns (bool success);
function transferFrom(address _from, address _to, uint _value) returns (bool success);
function approve(address _spender, uint _value) returns (bool success);| // @desc Creates a list of domains with custom TLDs using a pattern string with fixed length with option for keywords | |
| // @param {String} pattern | |
| // @param {Array|String} tlds | |
| // @returns {Array} domainList | |
| // | |
| // | |
| // Pattern string is defined by: | |
| // - keywords lowercase | |
| // - any letter uppercase A | |
| // - consonants uppercase C |
| // Crawl nested object and find data that matches your __CONDITION__ | |
| const crawlObject = (evalObj, prevObj, prevKey) => { | |
| if (typeof evalObj === "object") { | |
| Object.keys(evalObj).map((key) => crawlObject(evalObj[key], evalObj, key)); | |
| } else { | |
| if (__CONDITION__) { | |
| // DO SOMETHING | |
| console.log(prevObj[prevKey]) | |
| } |