Skip to content

Instantly share code, notes, and snippets.

View ApolloTang's full-sized avatar
🏠
Working from home

Apollo Tang ApolloTang

🏠
Working from home
  • Toronto Canada
View GitHub Profile
@ApolloTang
ApolloTang / npm-cheat-sheet.md
Created December 18, 2016 01:25 — forked from AvnerCohen/npm-cheat-sheet.md
Node.js - npm Cheat Sheet

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

@ApolloTang
ApolloTang / Unicode table
Created May 7, 2017 14:28 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:

react-native-dotenv

link

Read environment vairable from .env file

Usage :

filename: .env

API_KEY=lorem
const start = 10
const end = 20
const length = end - start + 1
let count = length
while (count) {
const index = end - count + 1
console.log(count, index)
count--
}
@ApolloTang
ApolloTang / semi-colon.js
Created July 24, 2017 08:10 — forked from tekaratzas/semi-colon.js
Semi-Colon Hell Javascript
/**
Here, the parser will add a semi colon after return causing the function to return nothing.
**/
function test(){
var name = "Hello";
return // it will add a ; here
{
name: name
}
}
@ApolloTang
ApolloTang / gist:32462333b7aadaca8cc264bde21f9e62
Created November 21, 2017 04:41
unity asset package is empty
asdfa
unity asset package is empty, screen shot
@ApolloTang
ApolloTang / gist:c71f874d62bbd776421181370d67306f
Created December 6, 2017 05:38
youcompleteme fail installing --cs-completer on OSX
~/.vim/plugged/YouCompleteMe
$ ./install.py --cs-completer
Searching Python 2.7 libraries...
Found Python library: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/libpython2.7.dylib
Found Python headers folder: /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
-- The C compiler identification is AppleClang 9.0.0.9000038
-- The CXX compiler identification is AppleClang 9.0.0.9000038
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
$ mvim --version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Oct 21 2017 13:14:19)
MacOS X (unix) version
Included patches: 1-1203
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +find_in_path -mouse_sysmouse -tag_any_white
+arabic +float +mouse_urxvt -tcl
+autocmd +folding +mouse_xterm +termguicolors
+balloon_eval -footer +multi_byte +terminal
@ApolloTang
ApolloTang / gist:57879804ab9ea4adb7e93911bf18cf5f
Created December 7, 2017 02:06
YouCompleteMe build in OmniSharpServer
~/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer
$ msbuild /property:Configuration=Release /property:TargetFrameworkVersion=v4.5
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 18 09:47:05 EDT 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 2017-12-06 9:06:28 PM.
Project "/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp.sln" on node 1 (default targets).
/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/OmniSharp.sln.metaproj : error MSB4126: The specified solution configuration "Release|mac" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. [/Users/apollotang/.vim/plugged/YouCompleteMe/third_party/ycmd/third_party/OmniSharpServer/O