Skip to content

Instantly share code, notes, and snippets.

View ibelem's full-sized avatar
🖖

Belem Zhang ibelem

🖖
  • Intel Corporation
  • Shanghai, PRC
  • X @ibelem
View GitHub Profile
{
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.pycodestyleEnabled": true,
"python.linting.pycodestylePath": "/home/belem/.local/bin/pycodestyle", // 设置pycodestyle的全局路径,需要在使用全局python pip安装
"python.formatting.provider": "autopep8",
"python.formatting.autopep8Path": "/home/belem/.local/bin/autopep8",
"workbench.colorTheme": "Monokai",
"window.zoomLevel": 0,
"editor.fontSize": 14,
@ibelem
ibelem / gh-pages.sh
Created May 28, 2019 01:56 — forked from skratchdot/gh-pages.sh
Initialize gh-pages branch
# create gh-pages branch
git checkout --orphan gh-pages
git rm -rf .
touch README.md
git add README.md
git commit -m 'initial gh-pages commit'
git push origin gh-pages
# add gh-pages as submodule
git checkout master
@ibelem
ibelem / Sync gh-pages + master branches
Created May 28, 2019 01:53 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
@ibelem
ibelem / .travis.linux.yml
Created August 7, 2018 07:08 — forked from chitoku-k/.travis.linux.yml
ChromeDriver on Travis CI
os: linux
node_js: '7'
sudo: required
env: DISPLAY=':99.0'
dist: trusty
addons:
apt:
sources:
- google-chrome
packages:
@ibelem
ibelem / @ SimpleDB.md
Created December 9, 2016 08:28
Simple DB

SimpleDB - Like Indexed DB, but Simple

A simple asynchronous data store.

STATUS: This is a thought experiment, not a serious proposal. Would basic async storage like this be useful? With this plus some locking primitive, could you build Indexed DB?

Like Indexed DB:

  • rich value types - store anything you can structured clone
  • rich key types - Number, String, Date, Array (of other key types)
sudo update-alternatives --config python3
conda activate base
conda deactivate
# 第一步:在你的用户文件下新建一个文件夹,这个.npm-global 名字可以用你自己喜欢的名字替换,推荐直接使用这个名字。
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
vim ~/.profile
export PATH=~/.npm-global/bin:$PATH
source ~/.profile
@ibelem
ibelem / gist:45f713c07bb38d573097
Created February 27, 2015 07:10
manifest.json
{
"name": "Deepin Test",
"manifest_version": 1,
"version": "0.0.0.1",
"description": "A sample application"
"xwalk_description": "A sample application with XWALK_"
"app": {
"launch":{
"web_url": "http://web.im.baidu.com"
}
for export proxy
# vim /etc/zsh/zshrc
export DISPLAY=":0.0"
vim /etc/ssh/ssh_config
Host github
Hostname github.com
IdentityFile ~/.ssh/id_rsa
@ibelem
ibelem / gist:ca9a0574b3e92c75cf21
Last active August 29, 2015 14:15
Work with react and react-canvas
$ git clone github:Flipboard/react-canvas.git
$ cd react-canvas
react-canvas$ sudo npm install -g react-tools
react-canvas$ sudo npm install -g react
react-canvas$ npm install
* [optional] Update package.json dependencies "scroller" if clone failed
react-canvas$ git clone github:mjohnston/scroller
cd scroller
@ibelem
ibelem / gist:601ab278b426eef76fc0
Last active August 29, 2015 14:15
Coding Style Guides
Python
https://www.python.org/dev/peps/pep-0008/
Class Names and Exception Names
CapWords
Method Names and Instance Variables
Lowercase with words separated by underscores as necessary
Leading underscore only for non-public methods and instance variables