Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Follow your passion.

Hank Wang hanksudo

:octocat:
Follow your passion.
  • Taipei, Taiwan & Tokyo, Japan
View GitHub Profile
@hanksudo
hanksudo / combineAndKeepOrder.go
Created Aug 18, 2021
(go) combine two array and keep order
View combineAndKeepOrder.go
package main
import "log"
func main() {
result := combineAndKeepOrder([]string{"a", "b", "c"}, []string{"c", "a", "d"})
log.Println(result, testEq(result, []string{"c", "b", "a", "d"}))
result = combineAndKeepOrder([]string{}, []string{"c", "a", "d"})
log.Println(result, testEq(result, []string{"c", "a", "d"}))
@hanksudo
hanksudo / remove-storyboard.md
Last active Dec 8, 2020
Initial iOS project without Storyboard (remove storyboard)
View remove-storyboard.md
  1. Remove Main.storyboard file
  2. Remove Main interface in Deployment Info

Screen Shot 2020-12-08 at 12 11 07

  1. Remove UISceneStoryboardFile key in Info.plist
<key>UISceneStoryboardFile</key>
View rxswift_note.md
  • Composable, Reusable
  • Declarative
  • Immutable

Observable

Fundamental part of RxSwift, Read-only

Create and subscribe Observable

@hanksudo
hanksudo / loopback.md
Created Nov 4, 2020
Add/remove loopback alias IPs on macOS
View loopback.md
# add 
sudo ifconfig lo0 alias 127.0.0.2

# revert
sudo ifconfig lo0 -alias 127.0.0.2
View terraform-note.md

Terraform note

example.tf

provider "aws" {
  profile    = "default"
  region     = "us-east-1"
}
@hanksudo
hanksudo / purgeAndroid.txt
Created Mar 20, 2018 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
View purgeAndroid.txt
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@hanksudo
hanksudo / class-private-publc.py
Created Oct 8, 2017
Python - class private publc
View class-private-publc.py
class Person:
def __init__(self):
pass
def _single(self):
print "single"
def __double(self):
print "double"
@hanksudo
hanksudo / monacoin-price-notifier.md
Last active Oct 8, 2017
Monacoin price notifier
View monacoin-price-notifier.md

Monacoin price notifier

Prerequisites

brew install jq

Installation