Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Binh Nguyen blcsntb

🏠
Working from home
View GitHub Profile
@blcsntb
blcsntb / README.md
Created Jul 11, 2020 — forked from lopspower/README.md
Hexadecimal color code for transparency
View README.md

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

@blcsntb
blcsntb / auto-deploy.md
Created Sep 20, 2018 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis
View auto-deploy.md

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.

@blcsntb
blcsntb / .travis.yml
Created Sep 13, 2018 — forked from willprice/.travis.yml
How to set up TravisCI for projects that push back to github
View .travis.yml
# 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:
View appium.md

Appium

TODO

  • Setup
  • Screenshot
  • Adjust time
@blcsntb
blcsntb / Shortcuts.md
Last active May 17, 2018
Keyboard shortcuts
View Shortcuts.md
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
View LoadProtocol.md
protocol LoadProtocol {
  func beginLoad()
  func endLoad()
}

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

Default

Default

Powerlevel9k

Powerlevel9k

View git-author-rewrite.sh
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="your-old-email@example.com"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="your-correct-email@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then