如何通过 Google Voice 注册美国电话号码

Jul 15, 2017

我们最终的目标是成功注册一个 Google Voice 账号并申请到一个美国电话号码。

为什么你需要一个美国电话号码的解释,请查阅:

google

支付宝当面付 php sdk 使用教程

May 30, 2017

封装提供的是最小参数项,去除了许多可选参数。

封装需要同官方提供的SDK一同使用。

SDK&DEMO下载

下面是代码:

alipay
php

Update nodejs & npm on Ubuntu

May 24, 2017

Just use nvm and do not try other methods.

nodejs
ubuntu

Redux 中的 reducer 到底是什么?

Mar 19, 2017

Redux有3大核心概念:

  • Action
  • Reducer
  • Store

其中ActionStore都非常好理解,我们可以直接按照其字面意思,将他们理解为动作储存

react
redux

Using Travis CI add 'auto build & publish' feature for your jekyll site on Github

Mar 10, 2017

Github Pages is very powerful and it’s free to use. Nowadays many developers deploy their blog & project pages on Github Pages using jekyll.

You’re free to use Github Pages Builder by default. But if you want to use additional plugins or other powerful features of jekyll, you’ll need to build your site locally and then push it to your Github repo.

And every time you update your site or add new posts, you’ll need to build it again and push it up again.

It’s very annoyinng and a waste of time.

Can’t we use some methods to make it automatically happen?

Of course we can!

travis-ci
jekyll

How to set up Nginx reverse proxy for Blocked Websites

Mar 10, 2017

Today I’ll guide you the set up an nginx server to host mirrors for blocked websites.

So you can visit them freely in restricted areas.

You’ll need a server that can access those blocked websites as well as can be accessed by your local machine.

If you haven’t got one, follow the very first step of this former tutorial.

linux
nginx

Use Atom as your Markdown editor

Feb 15, 2017

I’ve tested all the popular text/markdown editors on Valentine’s Day.

Including:

As a front-end developer who often write technical articles on github, I found that the best writing editor for me is Atom.

Baidu IFE warmup tasks solutions

Feb 15, 2017

IFE Answers

1.umbrella

Use your imagination, you could even draw three lines to pass this task.

My Amazon Books Wish List

Feb 14, 2017

The Amazon wish list has many bugs.I even can not share it to my friends via URL.

So I use two lines JavaScript to convert them into markdown:

list = $$('h5 a')
list.forEach(function(link){console.log('* ['+link.innerText+']' + '('+link.href+')')})
js
amazon

Fix php strtotime bug on 32bit server

Feb 2, 2017

You may get an integer overflow bug if you’re using strtotime on a 32bit server.

This was the Y2K38 problem.

The UNIX timestamp will reach the int variable limitation on 32bit OS at 19 January 2038.

However, we can fix this bug by using a customized function:

php

How to set up your own shadowsocks

Nov 30, 2016

史上最简单的从零开始Shadowsocks教程

1.打开搬瓦工VPS推荐站

shadowsocks

Recommended IOS Programming App

Oct 25, 2016
Programming
App

How to set up your own cloud storage

Oct 23, 2016

Vdisk shut down, 360yunpan shut down. It seems that we are losing every alternatives to store file on cloud. Buying more removable disk is not the solution. In fact, the best option is setting up your own cloud storage service.

Today I’m going to guide you to set up owncloud service. owncloud is an open source & free platform to store & share your files from all your devices(Including web/mobile/desktop). You could set it up for your own or share the service with your friends or family. I’d introduce you both ways to do so.

cloud
owncloud

FreeCodeCamp 学习参考

Oct 9, 2016

FreeCodeCamp 中文网官方维基文档,内容较少,不过是目前少有的中文参考资料。

FCC 官方wiki文档,内容多而全,只要你稍有英文基础,在做题闯关中遇到的所有疑惑基本都可以在这里找到答案。

freecodecamp

Push local projects to new git repo

Oct 7, 2016
git remote set-url origin https://xxx.com.git
git push origin master
bash
git

localStorage store JSON

Oct 6, 2016
/**localStorage store json**/
//Store
localStorage.books = JSON.stringify({name: 'json', stored: true})
//Get
var data = JSON.parse(localStorage.books)
js
html5

How to use shadowsocks(ss)

Sep 22, 2016

Quick User Guide

1.Get your configure info from shadowsocks service provider.

Remember these four things:

  • Server domain name or IP address
  • Encrypt Method (rc4-md5/aes-256-cfb/etc.)
  • Port number (8388 or some numbers)
  • Password

ss-info

shadowsocks

How to use mysql in commandline

Sep 18, 2016

Some useful mysql commands.

bash
sql

Prevent drag in wechat

Aug 25, 2016
// Prevent Drag in Wechat
    var overscroll = function(el) {
        el.addEventListener('touchstart', function() {
            var top = el.scrollTop,
                totalScroll = el.scrollHeight,
                currentScroll = top + el.offsetHeight;
            //If we're at the top or the bottom of the containers
            //scroll, push up or down one pixel.
            //
            //this prevents the scroll from "passing through" to
            //the body.
            if (top === 0) {
                el.scrollTop = 1;
            } else if (currentScroll === totalScroll) {
                el.scrollTop = top - 1;
            }
        });
        el.addEventListener('touchmove', function(evt) {
            //if the content is actually scrollable, i.e. the content is long enough
            //that scrolling can occur
            if (el.offsetHeight < el.scrollHeight)
                evt._isScroller = true;
        });
    }
    overscroll(document.querySelector('.swiper-container'));
    document.addEventListener('touchmove', function(evt) {
        //In this case, the default behavior is scrolling the body, which
        //would result in an overflow.  Since we don't want that, we preventDefault.
        if (!evt._isScroller) {
            evt.preventDefault();
        }
    });
wechat
mobile

iPhone play video inline & autoplay

Aug 25, 2016

Make videos playable inline on Safari on iPhone (prevents automatic fullscreen) and autoplay.

mobile