-
JSON
$ curl ifconfig.co/json
Response
{ "ip": "123.123.123.123",
"ip_decimal": 1234512345,
JSON
$ curl ifconfig.co/json
Response
{
"ip": "123.123.123.123",
"ip_decimal": 1234512345,
$ curl ipinfo.io/ip |
db.stats(1024 * 1024 * 1024) |
interface State { | |
position: number; | |
} | |
function createDog() { | |
const state: State = { | |
position: 0, | |
}; | |
return { |
db.getCollection('summoners').aggregate([ | |
{ | |
$group: { | |
_id: { name: '$name' }, | |
uniques: { $addToSet: "$_id" }, | |
count: { $sum: 1 } | |
} | |
}, | |
{ | |
$match: { |
/** | |
* useSafeState | |
* - To avoid memory leak when setState called after unmounted | |
* @param defaultValue | |
*/ | |
export function useSafeState<T>(defaultValue?: T): [T, React.Dispatch<React.SetStateAction<T>>] { | |
let isMounted = true; | |
React.useEffect(() => () => { | |
isMounted = false; | |
}, []); |
const fs = require('fs'); | |
const path = require('path'); | |
const rimraf = require('rimraf'); | |
const ProgressBar = require('progress'); | |
const readFrom = path.join(__dirname, './test.json'); | |
const file = fs.readFileSync(readFrom); | |
const getRandomNumber = (number = 1000000) => Math.floor(Math.random() * number); |
cat script.js | openssl dgst -sha384 -binary | openssl base64 -A |
pragma solidity ^0.4.23; | |
/** | |
* @title Math | |
* @dev Javascript Math.min and Math.max implementation | |
*/ | |
library Math { | |
/** | |
* @dev Retreive smaller value from two parameters | |
*/ |