- npm & yarn
- webpack & dev server
npm start
(vendor.js) - react repl
- styling & css module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500S" type="static" mediaPresentationDuration="PT0H0M26.091S" maxSegmentDuration="PT0H0M5.000S" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011,http://dashif.org/guidelines/dash264"> | |
<Period duration="PT0H0M26.091S"> | |
<AdaptationSet segmentAlignment="true" maxWidth="720" maxHeight="900" maxFrameRate="30" par="720:900" lang="eng" subsegmentAlignment="true" subsegmentStartsWithSAP="1"> | |
<Representation id="17880936458342364vd" mimeType="video/mp4" codecs="avc1.64001F" width="720" height="900" frameRate="30" sar="1:1" startWithSAP="1" bandwidth="231005" FBQualityClass="hd" FBQualityLabel="720w" FBPlaybackResolutionMos="0:100.00,360:92.83,480:92.00,720:88.18,1080:83.23"> | |
<BaseURL>https://scontent-hkt1-2.cdninstagram.com/v/t50.2886-16/233536622_215662053824013_242533827639734245_n.mp4?_nc_ht=scontent-hkt1-2.cdninstagram.com&_nc_cat=1&_nc_ohc=AYsseZVpQrgAX8kokRa&edm=AABBvjUBAAAA&ccb=7-4&oh=6dc8990b2f41fcf9f710bac9af8d4cdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
font-family: sans-serif; | |
-ms-text-size-adjust: 100%; | |
-webkit-text-size-adjust: 100%; | |
} | |
body { | |
margin: 0; | |
} | |
article, | |
aside, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const assert = require('assert'); | |
// Given an array of integers, more than half of which are the same integer. Please print out that integer. | |
// Moore’s Voting Algorithm | |
// time: O(n) | |
// space: O(1) | |
// https://leetcode.com/problems/majority-element/ | |
// more than n/2 times | |
// hash counter solution? space O(n) | |
const major1 = function(a) { | |
let cnt = 0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minimum Absolute Difference in an Array | |
// comparing each pair O(n^2) | |
// sort first O(nlogn) + O(n) | |
exports.mad = function(arr) { | |
const a = arr.sort((a, b) => a - b); | |
let min = -1; | |
for (let i = 0, l = a.length; i < l - 1; i++) { | |
const d = Math.abs(a[i] - a[i + 1]); | |
if (min < 0 || d < min) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GitHub.prototype.writeFile = function (filePath, data, branch, commitTitle) { | |
branch = branch || this.options.branch | |
commitTitle = commitTitle || 'Add Staticman file' | |
return this.api.repos.createFile({ | |
user: this.options.username, | |
repo: this.options.repository, | |
path: filePath, | |
content: Buffer.from(data).toString('base64'), | |
message: commitTitle, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IRPCProvider { | |
getNetVersion(): Promise<string>; | |
ping(): Promise<boolean>; | |
getBalance(address: string): Promise<Wei>; | |
estimateGas(tx: Partial<IHexStrTransaction>): Promise<Wei>; | |
getTransactionCount(address: string): Promise<string>; | |
getTransactionByHash(txhash: string): Promise<TransactionData>; | |
getTransactionReceipt(txhash: string): Promise<TransactionReceipt>; | |
sendRawTx(tx: string): Promise<string>; | |
sendCallRequest(txObj: TxObj): Promise<string>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
export opaque type AccountBalance = number; | |
export opaque type AccountNumber: number = number; | |
export opaque type PaymentAmount: number = number; | |
// export opaque type AccountNumber = number; | |
// export opaque type PaymentAmount = number; | |
type Account = { | |
accountNumber: AccountNumber, | |
balance: AccountBalance, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am wangzuo on github. | |
* I am wangzuo (https://keybase.io/wangzuo) on keybase. | |
* I have a public key ASDILDRXcYHkQy6BMHRZifQ9sx63vh2ezWuskninGdITzwo | |
To claim this, I am signing this object: |
NewerOlder