Skip to content

Instantly share code, notes, and snippets.

View amazingandyyy's full-sized avatar
🦄

Andy Chen amazingandyyy

🦄
View GitHub Profile
import React from 'react';
import 'style.scss';
const NavButton = (props) => <div className='container'><div classname={`nav-btn ${props.active}`}><i>Click Me</i></div><div>
export default NavButton;
@amazingandyyy
amazingandyyy / bohdi-hackathon-promt.md
Last active June 26, 2018 22:30
Build an predication-marketing related application that utilizes the Bodhi public graphql api.

Run bodhi-server

git clone https://github.com/bodhiproject/bodhi-server
cd bodhi-server
npm install
npm run start-test
// go to localhost:8989/graphiql

Run bodhi-ui

@amazingandyyy
amazingandyyy / stuns
Created March 29, 2018 23:55 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
Escape sequence Text attributes
\x1b[0m All attributes off(color at startup)
\x1b[1m Bold on(enable foreground intensity)
\x1b[4m Underline on
\x1b[5m Blink on(enable background intensity)
\x1b[21m Bold off(disable foreground intensity)
\x1b[24m Underline off
\x1b[25m Blink off(disable background intensity)
const https = require('https');
const crypto = require('crypto');
const fs = require('fs');
const start = Date.now();
function doRequest(){
https
.request('https://www.google.com', (res)=>{
res.on('data',()=>{});

Introduction Blockchain.

  • The Short Unofficial Definition
    • Blockchain is a continuously growing list of records, the special block & chain structure and crypotography make the distributed ledger trustless.
  • The Basic Characteristics: Distributed, trustless, immutable, accountable -> Therefore can be DECENTRALIZED
    • Distributed: distributed ledger, managed by peer-to-peer(p2p) network (For use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks)
      • Centralized: all nodes are connected to the central node. Lead to single point of failure, scaling issue, and inefficiency problem
    • Trustless: It is Anti-fraud by consensus mechanism design (PoW made bitcoin the first digital currency to solve the double spending problem without the need of a trusted authority or central server.)
  • Immutable: Records are immutable by blocks & chaining design (Once rec
@amazingandyyy
amazingandyyy / hosting.md
Last active June 13, 2018 00:41 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
  • Basic Concepts Of The Blockchain.
    • The Short Unofficial Definition
      • Blockchain is a continuously growing list of records, the special block & chain structure and crypotography make the distributed ledger trustless.
    • The Basic Characteristics: Distributed, trustless, immutable, accountable -> Therefore can be DECENTRALIZED
      • Distributed: distributed ledger, managed by peer-to-peer(p2p) network (For use as a distributed ledger, a blockchain is typically managed by a peer-to-peer network collectively adhering to a protocol for validating new blocks)
        • Centralized: all nodes are connected to the central node. Lead to single point of failure, scaling issue, and inefficiency problem
      • Trustless: It is Anti-fraud by consensus mechanism design (PoW made bitcoin the first digital currency to solve the double spending problem without the need of a trusted authority or central server.)
  • Immutable: Records are immutable by blocks & chaining d

Amazingandyyy Golden Picks 2018 Sentiment Analysis

This is a quick synopsis of the Golden Picks 2018 to hold until Q3 using the languagecrunch Sentiment endpoint (utilizes Spacy).

Terms

  • polarity: whether the expressed opinion in a document, a sentence or an entity feature/aspect is positive, negative, or neutral. Advanced, "beyond polarity" sentiment classification looks, for instance, at emotional states such as "angry", "sad", and "happy". (Source: Wikipedia)
  • subjectivity: The subjectivity of words and phrases may depend on their context and an objective document may contain subjective sentences (e.g., a news article quoting people's opinions). (Source: Wikipedia

✊ HODL Picks