Skip to content

Instantly share code, notes, and snippets.

🤧
I may be slow to respond.

Kslr kslr

🤧
I may be slow to respond.
Block or report user

Report or block kslr

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
View gist:587a149e156d37486c94ac581e12c735
cd ~
wget http://nginx.org/download/nginx-1.14.0.tar.gz && tar zxvf nginx-1.14.0.tar.gz
wget https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.gz && tar xzvf pcre-8.42.tar.gz
wget https://www.openssl.org/source/openssl-1.1.0h.tar.gz && tar xzvf openssl-1.1.0h.tar.gz
wget http://www.zlib.net/zlib-1.2.11.tar.gz && tar xzvf zlib-1.2.11.tar.gz
cd nginx-1.14.0/
./configure --prefix=/usr/share/nginx \
--conf-path=/etc/nginx/nginx.conf \
--http-log-path=/var/log/nginx/access.log \
View Insert_sys_User
Begin
INSERT INTO `bm_db`.`sys_user` (`id`, `company_id`, `office_id`, `login_name`, `password`, `no`, `name`, `email`, `phone`, `mobile`, `user_type`, `photo`, `login_ip`, `login_date`, `login_flag`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`) VALUES
(new.`mid`, '1', '2', new.`mname`, 'bec204a30217559591243733a838bf10ec39cb2a171f7b04ffc09cd4', '0001', '管理员', new.`email`, '00000000', '1300000000', '', '/bus/userfiles/1/images/photo/2016/06/QQ%E6%88%AA%E5%9B%BE20160618174814.png', '10.211.55.2', '2017-05-07 15:12:20', '1', '1', '2013-05-27 08:00:00', '1', '2016-06-20 09:02:10', '管理员', '0');
end
View gist:037cf05f89f4bb3485eaf653a4e7246a
{
"taskdb": "mysql+taskdb://root:test@localhost:3306/m_task",
"projectdb": "mysql+projectdb://root:test@localhost:3306/m_project",
"resultdb": "mysql+resultdb://root:test@localhost:3306/m_result",
"message_queue": "redis://localhost:6379/db",
"result_worker": {
"result_cls": "my_result_worker.MyResultWorker"
},
"webui": {
"username": "kslr",
View 检测广告是否被屏蔽
if(typeof adBlock=='undefined'){
var html='<div id="adblock_wrapper" class="block-layer" style="z-index:1000;position:absolute;top:0px;width:100%;height:100%; background: rgba(0, 0, 0,0.7);"><div class="block-content" style="width:624px;margin:80px auto;min-height:70px;padding:35px 200px;background:#fff;"><div style="padding:10px 0px;padding-left:105px;height:50px;background:url(/img/common/img_block.png) no-repeat 20px center;color:#4c4c4c;font-size:14px;line-height:24px;"><p>如果启用了广告拦截软件,那么广告工具可能无法正常工作。</p><p>请关闭广告拦截软件并刷新页面。</p></div></div></div>';
$('body').css({'overflow': 'hidden'}).append(html);
}
@kslr
kslr / gist:18a773a950b635e44c9d
Created May 28, 2015
python检测图片大小
View gist:18a773a950b635e44c9d
import cStringIO, urllib2, Image
url = 'http://www.oschina.net/img/logo_s2.png'
file = urllib2.urlopen(url)
tmpIm = cStringIO.StringIO(file.read())
im = Image.open(tmpIm)
print im.size
@kslr
kslr / wall.py
Created Mar 20, 2015
Ubuntu Gnome3 随机切换壁纸
View wall.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: kslr
# @Date: 2015-03-19 16:34:24
# @Last Modified by: kslr
# @Last Modified time: 2015-03-19 17:25:33
import os
import time
import requests
from bs4 import BeautifulSoup
You can’t perform that action at this time.