blah |
![]() |
![]() |
| const fs = require('fs') | |
| const {sha3} = require('ethereumjs-util') | |
| const crypto = require('crypto') | |
| const file = fs.readFileSync(__dirname + '/file.png') | |
| const keccak256hash = sha3(file).toString('hex') | |
| console.log(keccak256hash) | |
| const sha256hash = crypto.createHash('sha256').update(file).digest().toString('hex') |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
Plain JavaScript objects are better than classes when they can be used, and many popular modern frameworks have adopted their use.
Consider that in React a component can be created as either a class or as an object.
// using a class
class Welcome extends React.Component {
render() {
Hello, {this.props.name}This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
- Installing Homebrew is effortless, open Terminal and enter :
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" - Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
Quick ref for Netlify custom domains
Host: www, Value: you-netlify-site.netlify.com, TTL: 30 min
Host: @, Value: 198.61.251.14, TTL: 30min
| 'use strict' | |
| // ideal for use with AWS Lambda and native Node.js modules | |
| // requires Docker: https://docs.docker.com/engine/installation/ | |
| /* | |
| Usage: | |
| node docker-npm.js install | |
| node docker-npm.js rebuild |
| 1. Copy/Paste the information below to the clipboard | |
| 2. Open the spreadsheet whose sheets need to be alphabetised | |
| 3. Choose Tools > Script editor > Blank (this opens a new tab in the browser) | |
| 4. Press Control+A followed by Control+V copy and paste the script in | |
| 5. Press Control+S to save the script | |
| 6. Choose Run > sortSheets | |
| 7. Go back to the spreadsheet tab to view the new sorted tab order | |
| --Copy everything below this line-- | |
| function sortSheets () { |
