Skip to content

Instantly share code, notes, and snippets.

View 6220119's full-sized avatar
🌴

Nguyen Vu Cuong (Ralph) 6220119

🌴
View GitHub Profile
@6220119
6220119 / cast_error.dart
Last active September 12, 2020 09:57
CastError in dart Sample
// ...
final platformChannel = MethodChannel('special');
// ...
final data = platformChannel.invokeMethod<Map<String, dynamic>('getData', arguments);
// got CastError: type '_InternalLinkedHashMap<dynamic, dynamic>'
// is not a subtype of type 'Map<String, dynamic>' in type cast
@6220119
6220119 / sampleREADME.md
Created July 5, 2020 11:02 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@6220119
6220119 / install_ruby_with_rbenv.md
Created June 8, 2020 07:42 — forked from stonehippo/install_ruby_with_rbenv.md
Installing a new Ruby with rbenv on Mac OS

Install a new Ruby with rbenv on Mac OS (and make yourself a superhero)

If you're doing stuff with Ruby on a Mac, e.g. installling Jekyll or something, by default you'll end up having to use the sudo command to do stuff, since the permission to modify the default config is not available to your user account.

This sucks and should be avoided. Here's how to fix that.

Installing a new Ruby

To make this better, we are going install a new, custom Ruby. This used to be a big, scary thing, but thanks to the awesome tools Homebrew and rbenv, it's a snap.*

A word of warning: you will have to use Terminal to install this stuff. If you are uncomfortable with text, words, and doing stuff with your computer beyond pointing and hoping, this may not work well for you. But if that's the case, I'm not sure why you were trying to use Ruby in the first place.

// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@6220119
6220119 / debug git cmd
Created May 11, 2020 03:06
Debug git cmd
GIT_TRACE=1 GIT_TRACE_PERFORMANCE=1 GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" [your git cmd]
# example
# GIT_TRACE=1 GIT_TRACE_PERFORMANCE=1 GIT_CURL_VERBOSE=1 GIT_SSH_COMMAND="ssh -vvv" git push --set-upstream origin migrate-gitlab-config
@6220119
6220119 / chrome-bookmark.js
Created March 14, 2020 16:40
Toggling AA modes Bookmark
javascript: (function(w) {
document.documentElement.insertAdjacentHTML(
"beforeEnd",
`<style>*{will-change:auto!important;-webkit-font-smoothing:${
["none", "antialiased", "subpixel-antialiased", "auto"][
(w.$$aamode = (++w.$$aamode | 0) % 4)
]
}!important;}</style>`
);
})(this);
# Google's Language Map
ach : Acoli
af : Afrikaans
ak : Akan
am : አማርኛ
ar : العربية
az : azərbaycan
ban : Balinese
be : беларуская
bem : Ichibemba
https://github.com/btford/write-good
https://github.com/get-alex/alex
http://atom.github.io/node-spellchecker
https://github.com/lukeapage/node-markdown-spellcheck
https://github.com/JasonEtco/prosebot
@6220119
6220119 / index.js
Created September 12, 2018 05:38 — forked from pioug/index.js
Errors to ignore on Sentry
const ignoreErrors: [
/__show__deepen/,
/Access is denied/,
/anonymous function: captureException/,
/Blocked a frame with origin/,
/console is not defined/,
/event is not defined/,
/feedConf/,
/MyIPhoneApp_ModifyShowModalDialog/,
/vid_mate_check is not defined/,
@6220119
6220119 / Install PIP to user site on macOS.md
Created August 28, 2018 03:20 — forked from haircut/Install PIP to user site on macOS.md
How to install and use pip without sudo or admin on macOS

Install and use pip on macOS without sudo / admin access

Most recently tested on macOS Sierra (10.12.6)

  1. Download the installation script; curl https://bootstrap.pypa.io/get-pip.py -o ~/Downloads/get-pip.py
  2. Run the installation, appending the --user flag; python ~/Downloads/get-pip.py --user. pip will be installed to ~/Library/Python/2.7/bin/pip
  3. Make sure ~/Library/Python/2.7/bin is in your $PATH. For bash users, edit the PATH= line in ~/.bashrc to append the local Python path; ie. PATH=$PATH:~/Library/Python/2.7/bin. Apply the changes, source ~/.bashrc.
  4. Use pip! Remember to append --user when installing modules; ie. pip install <package_name> --user

Note