1 | // Goal: invoke a function with a body + args without hard-coding arity. |
1 | //需求:想通过传函数体和参数去调用,但不确定参数(就是说不想写死参数) |
1 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
(Legacy one-liner from 2016 used the old install/master URL; use the official script above today.)
1 | https://iterm2.com/downloads/stable/iTerm2_v2_0.zip |
After launching iTerm2, press Cmd+, → Profiles → Terminal → set Terminal Type to xterm-new.
流程是啥
详细网上资料很多,下边三个都可以用,我就不赘述了
phpstorm远程调试
Zero-configuration Web Application Debugging with Xdebug and PhpStorm
cannot-debug-with-phpstorm-vagrant-xdebug
环境:
- server:shadowsocks(Linux)
- client:shadowsocks(Mac) , polipo
传送门:推荐VPS“搬瓦工”
理由有3:
- shadowsocks server: 一键安装(后续可自定义配置)
- 性价比高:目前比较便宜的是 $49.99 一年,1G内存,20G SSD的VPS,而且可以用 支付宝 支付
- 操作不能在简单了!
Mac的应用比如Xcode太大,一般不会自己下,别人airdrop给你,方便吧!
可是,升级时你就发现没有传给那个人的apple id密码你都没法升级了,而为了安全,除了appstore你别无选择
不过方法还是有的,为了自己不用蛋疼,记录在这
** 工作中常用的一些代码片段 **
1 | $("#ckAll").click(function() { |
Register a handler for a signal.
SIGALRM after N seconds.pcntl_alarm(0) clears pending alarms.以下是强大的gearman学习及安装记录,代码demo下边的来自网络的附录有很多可以参考。
Gearman 是一套用来把程式需求委派给机器,提供通用的程序框架来将任务分发在机器运算。
它同时具备并行工作的能力、负载均衡处理的能力,以及在不同程序语言之间沟通的能力。
为了实现tab页无刷,又不想全部用ajax动态生成,同时需要在tab页内有相关操作,简单的话就是用iframe了
先来看个demo: iframe-tabs
这个demo实现了基本的需求,使用中发现还有两点问题
history.back(-1) 历史返回时要记录之前选择的tab页Context: UnionPay / Visa / Mastercard credit and quasi-credit cards are often 16 digits; debit cards may be 16–19. Amex is commonly 15. For 16–19 digit numbers the check digit often uses the Luhn (mod 10) algorithm.
前言
银行金卡,维萨和万事达、银联品牌,如果是贷记卡或准贷记卡,一定为16位卡号。而借记卡可以16-19位不等。
美国运通卡则不论金卡或是白金卡、普通卡,都是15位卡号。
16-19 位卡号校验位采用 Luhm 校验方法计算