Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
// Create a Promise that resolves after ms time | |
var timer = function(ms) { | |
return new Promise(resolve => { | |
setTimeout(resolve, ms); | |
}); | |
}; | |
// Repeatedly generate a number starting | |
// from 0 after a random amount of time | |
var source = async function*() { |
## Install Docker | |
``` | |
# install the backported kernel | |
$ sudo apt-get update | |
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring | |
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<style> | |
* { | |
margin: 0; | |
padding: 0; |
# Version key/value should be on his own line | |
PACKAGE_VERSION=$(cat package.json \ | |
| grep version \ | |
| head -1 \ | |
| awk -F: '{ print $2 }' \ | |
| sed 's/[",]//g') | |
echo $PACKAGE_VERSION |
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
const Web3 = require("web3"); | |
const INFURA_END_POINT = "https://mainnet.infura.io/v3/<ENTER_INFURA_API_TOKEN>" | |
const web3 = new Web3(new Web3.providers.HttpProvider(INFURA_END_POINT)); | |
const getEthStats = async () => { | |
const gasPrice = await web3.eth.getGasPrice(); //average gas price | |
const currentBlock = await web3.eth.getBlock("latest"); | |
let result = null; | |
if (currentBlock.number !== null) { //only when block is mined not pending | |
const previousBlock = await web3.eth.getBlock(currentBlock.parentHash); |
Vendor Id | Vendor Name |
---|---|
0x0033 | Paradyne Corp. |
0x003D | master |
0x0070 | Hauppauge Computer Works Inc. |
0x0100 | USBPDO-8 |
0x0123 | General Dynamics |
0x0315 | SK - Electronics Co., Ltd. |
0x0402 | Acer aspire one |
0x046D | Logitech Inc. |
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }' | |
# If Homebrew is not installed uncomment the next line | |
# /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Install Wine and WineTricks | |
brew install wine && brew install winetricks | |
# Download CircuitMaker | |
curl https://s3.amazonaws.com/altium-install/CircuitMaker/CircuitMakerSetup.exe -o ~/Downloads/CircuitMakerSetup.exe |