Skip to content

Instantly share code, notes, and snippets.

View sonhanguyen's full-sized avatar

Harry sonhanguyen

  • Melbourne, Australia
View GitHub Profile
@sonhanguyen
sonhanguyen / mobX.md
Last active October 6, 2022 01:50
use revealjs to view

MobX


  • What it is
  • Why do we need it
  • How do we use it
  • How it works


/*
## NexusFolder.ahk
##
## Switch default filemanager by launching this script without
## commandline parameters. If you send a file or folder as a
@sonhanguyen
sonhanguyen / nwb.config.js
Last active November 12, 2017 12:27
react typescript scratchpad
module.exports = {
type: 'react-app',
webpack: {
extra: {
resolve: {
extensions: ['.js', '.jsx', '.json', '.tsx', '.ts' ]
},
module: {
rules: [
{ test: /\.jsx|tsx?$/, exclude: /node_modules/,
@sonhanguyen
sonhanguyen / mixin_delegate_decorator.ts
Last active October 31, 2022 13:44
kotlin's style delegate in typescript
function delegateTo(prop: string) {
const { __proto__ } = this
Object.setPrototypeOf(this,
new Proxy({}, {
get: (target, name) => {
target = this[prop]
if (name === prop) return target
if (name in __proto__) return __proto__[name]
return target ? target[name] : undefined
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 / -
Last active September 2, 2017 02:54
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
@sonhanguyen
sonhanguyen / cloudSettings
Last active November 12, 2017 04:09 — forked from itkq/filter.rb
Alfred Vivaldi workflow
{"lastUpload":"2017-10-30T13:54:53.487Z","extensionVersion":"v2.8.3"}
@sonhanguyen
sonhanguyen / jest-webpack-loader.js
Last active May 13, 2017 16:50
make jest behave using (webpack) loader-runner
const deasync = require('deasync')
const runLoaders = deasync(require('loader-runner').runLoaders)
const { module: { rules } } = config = require('./webpack.base')
const fs = require('fs')
const resolveLoader = req => {
let loader = req
req = ~req.indexOf`?`
if (req) {
const index = ~req
@sonhanguyen
sonhanguyen / hyperact.coffee
Last active April 10, 2017 01:44
make coffeescript act again (act again <- get it?)
try do registerInstaller = -> require 'autoinstall' catch notFound
require('child_process').execSync 'npm i autoinstall'
registerInstaller()
hyperstyles = require 'hyperstyles'
h = require('react-hyperscript')
o = hyperstyles h,
(require 'csjs')"""
.panel {
border: 1px solid black;
_ = require 'lodash'
imdb = require 'imdb-api'
rarbg = require 'rarbgto-api'
fetch = require 'isomorphic-fetch'
cache = require('memoize-fs') cachePath: './memoize-fs'
memoize = ({ store , invalidator }, func) ->
options = { cacheId: store, noBody: true }
atempt = ->