Skip to content

Instantly share code, notes, and snippets.

View HaoweiCh's full-sized avatar

好为 HaoweiCh

View GitHub Profile
@HaoweiCh
HaoweiCh / install.sh
Created December 27, 2017 02:45
mac one step install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install wget curl
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install pyenv pyenv-virtualenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshenv
echo 'export PATH=$HOME/bin:/usr/local/bin:$PATH' >> ~/.zshenv
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshenv
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.zshenv
echo -e 'if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; \nfi' >> ~/.zshenv
/*!
* jQuery Bootgrid v1.3.1 - 09/11/2015
* Copyright (c) 2014-2015 Rafael Staib (http://www.jquery-bootgrid.com)
* Licensed under MIT http://www.opensource.org/licenses/MIT
*/.bootgrid-footer,.bootgrid-header{margin:15px 0}.bootgrid-footer a,.bootgrid-header a{outline:0}.bootgrid-footer .search,.bootgrid-header .search{display:inline-block;margin:0 20px 0 0;vertical-align:middle;width:180px}.bootgrid-footer .search .glyphicon,.bootgrid-header .search .glyphicon{top:0}.bootgrid-footer .search .fa,.bootgrid-header .search .fa{display:table-cell}.bootgrid-footer .search .search-field::-ms-clear,.bootgrid-footer .search.search-field::-ms-clear,.bootgrid-header .search .search-field::-ms-clear,.bootgrid-header .search.search-field::-ms-clear{display:none}.bootgrid-footer .pagination,.bootgrid-header .pagination{margin:0!important}.bootgrid-footer .infoBar,.bootgrid-header .actionBar{text-align:right}.bootgrid-footer .infoBar .btn-group>.btn-group .dropdown-menu,.bootgrid-header .actionBar .btn-group>.btn-gro
@HaoweiCh
HaoweiCh / block_feelBetter.txt
Created May 11, 2016 11:32
ublock original
baidu.com##ul.wgt-userbar
baidu.com###foot
baidu.com##div.user-info
www.baidu.com###ftCon
www.baidu.com###u
www.baidu.com###u1
baike.baidu.com##div.new-bdsharebuttonbox
baike.baidu.com##div.new-side-share
@HaoweiCh
HaoweiCh / DOM插入CSS样式表 URL.js
Last active October 8, 2023 00:59
在 DOM 插入CSS样式
function addCssFile(url) {
var link = document.createElement("link");
link.setAttribute("rel", "stylesheet");
link.setAttribute("type", "text/css");
link.setAttribute("href", url);
document.head.appendChild(link);
}
function addCssStyle(css) {
document.head.appendChild(document.createElement("style")).textContent = css;
}
@HaoweiCh
HaoweiCh / 0_reuse_code.js
Last active June 22, 2016 07:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@HaoweiCh
HaoweiCh / 改变网页背景为护眼色
Created November 12, 2015 12:50
改变网页背景为护眼色
// ==UserScript==
// @name 改变网页背景为淡灰色
// @namespace pecial Links Converter
// @description 只改变网页中背景的白色和接近白色的为淡灰色。
// @version 1.0
// @include http*
// @include ftp
// @exclude
// ==/UserScript==