Skip to content

Instantly share code, notes, and snippets.

View truongngoclinh's full-sized avatar
🎯
Focusing

Trương Ngọc Linh truongngoclinh

🎯
Focusing
  • Tokyo
View GitHub Profile
@truongngoclinh
truongngoclinh / work-with-multiple-github-accounts.md
Created June 5, 2023 12:14 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@truongngoclinh
truongngoclinh / TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Created May 3, 2019 05:29 — forked from rimatla/TSLInt-Prettier-CreateReactApp-TypeScript-setup.md
Create React App + TypeScript Linting with TSLint and Prettier setup for on VSCode

Ps: The current setup was done on 01-04-19

Project Dependency Versions at the time 👇

  "react": "^16.7.0",
  "react-dom": "^16.7.0",
  "react-scripts": "2.1.3",
  "typescript": "^3.2.2"
  "tslint": "^5.12.0",
  "tslint-config-prettier": "^1.17.0",
@truongngoclinh
truongngoclinh / UnsafeHttpClient.kt
Created December 18, 2018 05:22 — forked from maiconhellmann/UnsafeOkHttpClient.kt
UnsafeHttpClient wrote in Kotlin
import okhttp3.OkHttpClient
import java.security.cert.CertificateException
import javax.net.ssl.SSLContext
import javax.net.ssl.TrustManager
import javax.net.ssl.X509TrustManager
class UnsafeOkHttpClient {
companion object {
fun getUnsafeOkHttpClient(): OkHttpClient.Builder {
try {
@truongngoclinh
truongngoclinh / actionlist.vim
Created July 2, 2018 07:42 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@truongngoclinh
truongngoclinh / actionlist.vim
Created July 2, 2018 07:42 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@truongngoclinh
truongngoclinh / actionlist.vim
Created July 2, 2018 07:42 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@truongngoclinh
truongngoclinh / pyDes.py
Created January 3, 2018 09:58 — forked from eigenein/pyDes.py
A pure python implementation of the DES and TRIPLE DES encryption algorithms
#############################################################################
# Documentation #
#############################################################################
# Author: Todd Whiteman
# Date: 16th March, 2009
# Verion: 2.0.0
# License: Public Domain - free to do as you wish
# Homepage: http://twhiteman.netfirms.com/des.html
#
@truongngoclinh
truongngoclinh / mysql2sqlite.sh
Created October 30, 2017 03:06 — forked from cabbiepete/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@truongngoclinh
truongngoclinh / gist:3b99f0cc89ed8005701e2fbf3c5093c2
Created June 22, 2017 08:00 — forked from steipete/ios-xcode-device-support.sh
Using iOS 10.3 devices with Xcode 8.2.1
// The trick is to link the DeviceSupport folder from the beta to the stable version.
// Updated on Jan 24th, 2017 for Xcode 8.3b1
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.3\ \(14E5230d\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
@truongngoclinh
truongngoclinh / gist:368aa2ddfbc1557b24da4a44a5dd376f
Created June 12, 2017 08:21 — forked from dodyg/gist:5823184
Kotlin Programming Language Cheat Sheet Part 1

#Intro

Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3

Kotlin project website is at kotlin.jetbrains.org.

All the codes here can be copied and run on Kotlin online editor.

Let's get started.