Skip to content

Instantly share code, notes, and snippets.

Avatar

Harry sonhanguyen

  • Melbourne, Australia
View GitHub Profile
View Main.scala
import com.river11576.transcript_search._
import scala.concurrent.Await
import scala.concurrent.duration.Duration
object Main {
// https://www.wordhunt.xyz/api/freemium?phrase=test
def main(argv: Array[String]) = {
print(
Await.result(
@sonhanguyen
sonhanguyen / app.tsx
Last active Sep 7, 2018
Services in React's new context API
View app.tsx
import * as React from 'react'
import { render } from 'react-dom'
import { compose, fromRenderProps } from 'recompose'
import { identity, pick, mapValues } from 'lodash'
const withDependencies = (...services: Array<[any, Function]>) => {
const enhance = compose(
...services.map(([service, mapProps]) => fromRenderProps(
Service.contextFor(service).Consumer,
mapProps
View App.tsx
import * as React from 'react'
import Grid from './Grid'
import './App.css'
interface BaseLineItem {
id: string
name: string
cost: number
}
@sonhanguyen
sonhanguyen / mobX.md
Created Nov 16, 2017
use revealjs to view
View mobX.md

MobX


"How I learn to love React" cliche

  • What it is
  • Why do we need it
  • How do we use it
  • Some gotchas
  • Demo
@sonhanguyen
sonhanguyen / nwb.config.js
Last active Nov 12, 2017
react typescript scratchpad
View nwb.config.js
module.exports = {
type: 'react-app',
webpack: {
extra: {
resolve: {
extensions: ['.js', '.jsx', '.json', '.tsx', '.ts' ]
},
module: {
rules: [
{ test: /\.jsx|tsx?$/, exclude: /node_modules/,
View NexusFolder.ahk
/*
## NexusFolder.ahk
##
## Switch default filemanager by launching this script without
## commandline parameters. If you send a file or folder as a
@sonhanguyen
sonhanguyen / cloudSettings
Last active Nov 12, 2017 — forked from itkq/filter.rb
Alfred Vivaldi workflow
View cloudSettings
{"lastUpload":"2017-10-30T13:54:53.487Z","extensionVersion":"v2.8.3"}
View -
Package name ID Manager Installed version
------------------------------- ------------------------------- --------- -------------------
alfred alfred cask 3.2_759
amethyst amethyst cask 0.10.1
cheatsheet cheatsheet cask 1.2.6
chromedriver chromedriver brew 2.27
ccat ccat brew 1.1.0
colorls colorls gem 0.1.7
DrCleaner 921458519 mas 3.2.0
eintopf eintopf cask 1.3.2
View pip list
graphene (0.7.3)
howdoi (1.1.9)
http-prompt (0.10.2)
jupyterlab (0.26.4)
meta-package-manager (2.5.0)
@sonhanguyen
sonhanguyen / cloudSettings
Last active Jul 11, 2017
Visual Studio code settings
View cloudSettings
{"lastUpload":"2017-07-02T02:01:08.109Z","extensionVersion":"v2.8.1"}