Skip to content

Instantly share code, notes, and snippets.

William Liu ayonliu

Block or report user

Report or block ayonliu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ayonliu
ayonliu / checkall.js
Created Sep 2, 2019
Check all checkbox by name
View checkall.js
function opcheckboxed(objName, type){
var objNameList=document.getElementsByName(objName);
if(null!=objNameList){
for(var i=0;i<objNameList.length;i++){
if(objNameList[i].checked==true)
{
if(type != 'checkall') { // 非全选
objNameList[i].checked=false;
}
View md5.min.js
!function(n){"use strict";function t(n,t){var r=(65535&n)+(65535&t);return(n>>16)+(t>>16)+(r>>16)<<16|65535&r}function r(n,t){return n<<t|n>>>32-t}function e(n,e,o,u,c,f){return t(r(t(t(e,n),t(u,f)),c),o)}function o(n,t,r,o,u,c,f){return e(t&r|~t&o,n,t,u,c,f)}function u(n,t,r,o,u,c,f){return e(t&o|r&~o,n,t,u,c,f)}function c(n,t,r,o,u,c,f){return e(t^r^o,n,t,u,c,f)}function f(n,t,r,o,u,c,f){return e(r^(t|~o),n,t,u,c,f)}function i(n,r){n[r>>5]|=128<<r%32,n[14+(r+64>>>9<<4)]=r;var e,i,a,d,h,l=1732584193,g=-271733879,v=-1732584194,m=271733878;for(e=0;e<n.length;e+=16)i=l,a=g,d=v,h=m,g=f(g=f(g=f(g=f(g=c(g=c(g=c(g=c(g=u(g=u(g=u(g=u(g=o(g=o(g=o(g=o(g,v=o(v,m=o(m,l=o(l,g,v,m,n[e],7,-680876936),g,v,n[e+1],12,-389564586),l,g,n[e+2],17,606105819),m,l,n[e+3],22,-1044525330),v=o(v,m=o(m,l=o(l,g,v,m,n[e+4],7,-176418897),g,v,n[e+5],12,1200080426),l,g,n[e+6],17,-1473231341),m,l,n[e+7],22,-45705983),v=o(v,m=o(m,l=o(l,g,v,m,n[e+8],7,1770035416),g,v,n[e+9],12,-1958414417),l,g,n[e+10],17,-42063),m,l,n[e+11],22,-1990404162),v=o(v
@ayonliu
ayonliu / who-am-i-cn.md
Last active Aug 9, 2018
介绍我是谁
View who-am-i-cn.md

我是一名生活在上海的程序员

@ayonliu
ayonliu / mysql_reference.md
Last active Feb 28, 2018
mysql 的一些参考
View mysql_reference.md

LOAD DATA INFILE Syntax

The LOAD DATA INFILE statement reads rows from a text file into a table at a very high speed.

LOAD DATA LOCAL INFILE '/tmp/merchant.log' 
REPLACE INTO TABLE `log` 
FIELDS TERMINATED BY ',' 
OPTIONALLY ENCLOSED BY '"' 
LINES TERMINATED BY '\n' 
@ayonliu
ayonliu / Install-MySQL-on-CentOS7.md
Last active Dec 8, 2016
Install MySQL on CentOS 7
View Install-MySQL-on-CentOS7.md

Install MySQL on CentOS 7

Install MySQL on CentOS 7 How to Install MySQL on CentOS 7

rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm,
yum install mysql-community-server
mysql_secure_installation

Failed! Error: Your password does not satisfy the current policy requirements

@ayonliu
ayonliu / Install-php5.6-on-Centos7.md
Last active Aug 28, 2019
Install php5.6 on Centos 7
View Install-php5.6-on-Centos7.md
@ayonliu
ayonliu / setting_up_vagrant.md
Last active Dec 7, 2016
vagrant getting started
View setting_up_vagrant.md

INSTALLING A BOX

vagrant box add ubuntu/xenial64

执行上面命令后可以看到 ubuntu/xenial64 对应的下载地址,可以复制下来用下载工具下载并存储到 D:/vagrant/boxes/xenial-server-cloudimg-amd64-vagrant.box

可以改成下面通过添加本地 box 的方式:

vagrant box add ubuntu/xenial64 D:/vagrant/boxes/xenial-server-cloudimg-amd64-vagrant.box

查看系统已经有的 box:

@ayonliu
ayonliu / Vagrantfile
Created Dec 6, 2016
Vagrantfile for vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@ayonliu
ayonliu / mydomain.conf
Last active Nov 27, 2015
nginx configure for mydomain.com, include by nginx.conf
View mydomain.conf
# Upstream to abstract backend connection(s) for php
upstream php {
# server unix:/tmp/php-cgi.socket;
server 127.0.0.1:9000;
}
server {
## Your website name goes here.
server_name mydomain.com www.mydomain.com ;
## Your only path reference.
@ayonliu
ayonliu / nginx.conf
Created Nov 27, 2015
my nginx configure
View nginx.conf
# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
You can’t perform that action at this time.