Skip to content

Instantly share code, notes, and snippets.

@lichenbuliren
lichenbuliren / GitConfigHttpProxy.md
Created September 13, 2019 01:42 — forked from evantoli/GitConfigHttpProxy.md
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@lichenbuliren
lichenbuliren / git_toturial
Created May 12, 2017 02:36 — forked from guweigang/git_toturial
git命令大全
git init # 初始化本地git仓库(创建新仓库)
git config --global user.name "xxx" # 配置用户名
git config --global user.email "xxx@xxx.com" # 配置邮件
git config --global color.ui true # git status等命令自动着色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto
git config --global --unset http.proxy # remove proxy configuration on git
git clone git+ssh://git@192.168.53.168/VT.git # clone远程仓库
@lichenbuliren
lichenbuliren / vagrant-homestead-php7-redis.sh
Created April 12, 2017 10:26 — forked from aNd1coder/vagrant-homestead-php7-redis.sh
Installing PHP REDIS PHP7 Branch On Fresh Install Homestead PHP7 Branch
vagrant@homestead:~$ sudo apt-get update
vagrant@homestead:~$ git clone -b php7 https://github.com/phpredis/phpredis.git
vagrant@homestead:~$ sudo mv phpredis/ /etc/
vagrant@homestead:~$ cd /etc/phpredis
vagrant@homestead:/etc/phpredis$ phpize
vagrant@homestead:/etc/phpredis$ ./configure
vagrant@homestead:/etc/phpredis$ make && make install
# Note This is an Extension You Need to Enable to Make it Work in Php 7
# This First Command Will Allow You To Call PHPREDIS Facade in Browser
@lichenbuliren
lichenbuliren / _tint-and-shade.scss
Created January 8, 2017 09:57
Tint and Shade functions for Sass
// Add percentage of white to a color
@function tint($color, $percent){
@return mix(white, $color, $percent);
}
// Add percentage of black to a color
@function shade($color, $percent){
@return mix(black, $color, $percent);
}
@lichenbuliren
lichenbuliren / introrx.md
Created November 24, 2016 07:39 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@lichenbuliren
lichenbuliren / my.sh
Created October 17, 2016 07:27 — forked from kaiye/my.sh
常用 Linux 命令行
# 网络
# 查看本地公网 IP
curl ifconfig.me
dig 1024.io
dig -x 104.155.233.156
# 并发测试
ab -n 1000 -c 1000 http://www.meizu.com/
# 全站抓取
wget -r -p -np -k http://www.meizu.com/es/
@lichenbuliren
lichenbuliren / input_cursor_color
Created July 26, 2016 05:50 — forked from JoeKeikun/input_cursor_color
How to change <input> input cursor color by css (webkit)
When I developed an app for ios by phonegap, I had a trouble in changing the <input> input cursor color.
but now, there is a solution for it:
---------------
<style>
input {
color: rgb(60, 0, 248); /* change [input cursor color] by this*/
text-shadow: 0px 0px 0px #D60B0B; /* change [input font] by this*/
-webkit-text-fill-color: transparent;
@lichenbuliren
lichenbuliren / parseurl.js
Created June 14, 2016 08:14 — forked from aNd1coder/parseurl.js
A useful javascript url parse function
function parseURL(url) {
var parser = document.createElement('a'),
searchObject = {},
queries, split, i;
// Let the browser do the work
parser.href = url;
// Convert query string to object
queries = parser.search.replace(/^\?/, '').split('&');
for( i = 0; i < queries.length; i++ ) {
split = queries[i].split('=');