Skip to content

Instantly share code, notes, and snippets.

View binhapp's full-sized avatar
🚀

Binh Nguyen binhapp

🚀
View GitHub Profile
@binhapp
binhapp / TypeScript.md
Last active December 1, 2022 10:34
Rename js to tsx or ts

Rename js to tsx or ts

grep "'react'" -rn src/**/*.js | grep -o ".*\." | xargs -I {} git mv {}js {}tsx
find src -name "*.js" | grep -o ".*\." | xargs -I {} git mv {}js {}ts

karabiner

@binhapp
binhapp / README.md
Created July 11, 2020 08:21 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@binhapp
binhapp / auto-deploy.md
Created September 20, 2018 06:16 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@binhapp
binhapp / .travis.yml
Created September 13, 2018 03:03 — forked from willprice/.travis.yml
How to set up TravisCI for projects that push back to github
# Ruby is our language as asciidoctor is a ruby gem.
lang: ruby
before_install:
- sudo apt-get install pandoc
- gem install asciidoctor
script:
- make
after_success:
- .travis/push.sh
env:
@binhapp
binhapp / appium.md
Last active August 17, 2018 01:41
Appium

Appium

TODO

  • Setup
  • Screenshot
  • Adjust time
@binhapp
binhapp / Shortcuts.md
Last active May 17, 2018 09:58
Keyboard shortcuts
Description macOS, iTerm2 vim
Begin of line Command-A ^
End of line Command-E $
Delete Command-H x
Up Arrow Command-P k
Down Arrow Command-N j
Right Arrow Command-F h
Left Arrow Command-N l
protocol LoadProtocol {
  func beginLoad()
  func endLoad()
}

extension LoadProtocol {
  func load<T>(_ action: T, _ perform: (T, @escaping () -> Void) -> Void) {
    beginLoad()
 perform(action, endLoad)
@binhapp
binhapp / iterm2-solarized.md
Created January 10, 2018 07:30 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k