Skip to content

Instantly share code, notes, and snippets.

View vdloc's full-sized avatar
:accessibility:
Good things take time

Vũ Đức Lộc vdloc

:accessibility:
Good things take time
View GitHub Profile
@vdloc
vdloc / .gitconfig
Last active July 10, 2021 16:56
.gitconfig
[alias]
# IGNORE
ignore-add = "!f() { echo $1 >> .gitignore; }; f"
ignore-list = status --ignored
ignore-check = check-ignore
ignore-future-changes = update-index --assume-unchanged
ignore-tracked-files = update-index --skip-worktree
ignore-tracked-files-reverse = update-index --no-skip-worktree
# STATUS
@vdloc
vdloc / .bash_aliases
Last active June 22, 2021 13:26
.bash_aliases
alias ls='ls --color=auto'
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias update-npm-packages='npx npm-check-updates -u'
@vdloc
vdloc / react-rendering.md
Created November 14, 2020 15:53 — forked from tuhuynh27/react-rendering.md
A (Mostly) Complete Guide to React Rendering Behavior

Translated from https://blog.isquaredsoftware.com/2020/05/blogged-answers-a-mostly-complete-guide-to-react-rendering-behavior/, author: Mark Erikson (from Redux team)

A (Mostly) Complete Guide to React Rendering Behavior

Bài viết cung cấp chi tiết về cách mà React render hoạt động, và việc sử dụng Context và Redux ảnh hưởng thế nào tới quá trình render của React.

"Render" là gì

Rendering is the process of React asking your components to describe what they want their section of the UI to look like, now, based on the current combination of props and state.

@vdloc
vdloc / regex-japanese.txt
Created October 22, 2020 11:46 — forked from terrancesnyder/regex-japanese.txt
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@vdloc
vdloc / JapaneseRegex.js
Created September 24, 2020 02:45 — forked from ryanmcgrath/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
@vdloc
vdloc / japanese-full-to-half-method.js
Created September 22, 2020 02:30 — forked from heeju/japanese-full-to-half-method.js
Convert full-width Japanese character to half-width ascii character
String.prototype.toHalfWidth = function() {
return this.replace(/[!-~]/g, function(r){
return String.fromCharCode(r.charCodeAt(0) - 0xFEE0);
});
};
@vdloc
vdloc / japanese-full-to-half-method.js
Created September 22, 2020 02:30 — forked from heeju/japanese-full-to-half-method.js
Convert full-width Japanese character to half-width ascii character
String.prototype.toHalfWidth = function() {
return this.replace(/[!-~]/g, function(r){
return String.fromCharCode(r.charCodeAt(0) - 0xFEE0);
});
};
@vdloc
vdloc / cloudSettings
Last active April 15, 2021 08:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-01-01T00:49:22.072Z","extensionVersion":"v3.4.3"}
@vdloc
vdloc / input.scss
Created May 14, 2019 07:04 — forked from lukasborawski/input.scss
Perfect media-queries screen breakpoints SASS @mixin. Tested on Apple Devices: iPhone4, iPhone5, iPad3, MacBook Pro, iPad Mini. http://sassmeister.com/gist/8529371
$media-queries: true;
@mixin bp($point) {
@if ($media-queries) {
$bp-large-screen: 1824px;
$bp-bigscreen: 1824px;
$bp-ipad-max: 1024px;
$bp-ipad-min: 768px;
$bp-iphone5-max: 568px;
$bp-iphone-max: 480px;
@vdloc
vdloc / input.scss
Created May 14, 2019 07:04 — forked from lukasborawski/input.scss
Perfect media-queries screen breakpoints SASS @mixin. Tested on Apple Devices: iPhone4, iPhone5, iPad3, MacBook Pro, iPad Mini. http://sassmeister.com/gist/8529371
$media-queries: true;
@mixin bp($point) {
@if ($media-queries) {
$bp-large-screen: 1824px;
$bp-bigscreen: 1824px;
$bp-ipad-max: 1024px;
$bp-ipad-min: 768px;
$bp-iphone5-max: 568px;
$bp-iphone-max: 480px;