Skip to content

Instantly share code, notes, and snippets.

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

jack jackz3

🏠
Working from home
View GitHub Profile
@jackz3
jackz3 / .tmux.conf
Last active February 15, 2018 05:09
# :splitw -h -p 20
# tmux source ~/.tmux.conf
# git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Use prefix–I install plugin
# Start window numbering at 1
set -g base-index 1
# set -g default-terminal "screen-256color"
set-window-option -g mode-keys vi
set -g mouse on
bind h select-pane -L # 切换到左边的 Pane
@jackz3
jackz3 / c9_jupyter.sh
Last active December 14, 2017 02:08 — forked from buo/init_jupyter.sh
A script that automatically configures Jupyter on Cloud9
#!/bin/bash
sudo pip install --grade pip
sudo pip install jupyter
jupyter notebook --generate-config
sed -i "s/#c.NotebookApp.port = 8888/c.NotebookApp.port = $PORT/" ~/.jupyter/jupyter_notebook_config.py
sed -i "s/#c.NotebookApp.ip = 'localhost'/c.NotebookApp.ip = '0.0.0.0'/" ~/.jupyter/jupyter_notebook_config.py
sed -i "s/#c.NotebookApp.open_browser = True/c.NotebookApp.open_browser = False/" ~/.jupyter/jupyter_notebook_config.py
@jackz3
jackz3 / .vimrc
Last active June 18, 2020 10:30
vimrc
" when no add-apt, sudo apt-get install software-properties-common
" sudo add-apt-repository ppa:jonathonf/vim
" sudo apt update && sudo apt install vim
" git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
" install https://github.com/Valloric/YouCompleteMe#installation
" apt-get install silversearcher-ag
set nocompatible
set encoding=utf-8
set tabstop=2

#Few Line of Hack Code Make React-Native Run on Windows

While React-Native just add support of Android,yet officeally they just only support on OSX.

After a few hours of debugging, I find a simple way of let React-Native run on Windows.

Make sure all requirements were all setup following this:

Then initilize the project following this:

var a = [[1492], [6656], [8759], [63166], [9287], [4369], [8811], [7556], [6262], [14399], [64357], [64353], [10546], [6450], [63794], [61408], [60467, 60463, 30321, 30325, 5103, 9471, 8510, 30243, 5103, 9471, 8510, 30321, 30325, 60467, 60463], [63413, 878, 10006, 64901], [57367, 10006, 64901, 14548, 14505], [10006, 64901, 30321, 30325, 6877, 9480, 30243, 6877, 9480, 30321, 30325, 10006, 64901], [57367, 10006, 64901, 30321, 30325, 14624, 61401, 30243, 14624, 61401, 30321, 30325, 57367, 10006, 64901], [62995, 4015, 62638, 64946, 30321, 30325, 3339, 7703,
30243, 3339, 7703, 30321, 30325, 62995, 4015, 62638, 64946], [10035, 9470, 8711, 30321, 30325, 3339, 7703, 30243, 3339, 7703, 30321, 30325, 10035, 9470, 8711], [62427, 643, 643], [6952, 14674, 10728], [10851, 10827, 14674, 10728], [30263, 30266, 30246, 30248, 30256, 30256, 30267], [30257, 30266, 30262, 30259, 30321, 30325, 30248, 30256, 30256, 30267, 30243, 30248, 30256, 30256, 30267, 30321, 30325, 30257, 30266, 30262, 30259], [12150, 2272, 11
function getViewport(){
var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight;
return {'w':x,'h':y};
}
function checkOrientation(){
var currMode = "";
switch(window.orientation){
case 0:
currMode = "portrait";
break;
case -90:
currMode = "landscape";
break;
case 90:
@jackz3
jackz3 / gist:2944853
Created June 17, 2012 15:28
check orientation using media query
@media screen and (orientation:portrait) {
#land{display:none;}
#port{width:320px; margin: 20px auto;}
}
@media screen and (orientation:landscape) {
#port{display:none;}
#land{width:90%; margin: 20px 5%;}
}
var jQuery = (function($) {
$.pluginFunc = function() {
}
return $;
}(jQuery));
var Module = (function() {
// 现在所有函数直接互访
var privateFunc = function() {
publicFunc1();
};
var publicFunc1 = function() {
publicFunc2();
};