Skip to content

Instantly share code, notes, and snippets.

View maizhibin's full-sized avatar

maizhibin maizhibin

View GitHub Profile
@maizhibin
maizhibin / .vimrc_basic_no_plugin
Created May 19, 2018 14:58
.vimrc basic and no plugin
"显示行号
set nu
"启动时隐去援助提示
set shortmess=atI
"语法高亮
syntax on
"没有保存或文件只读时弹出确认
// ==UserScript==
// @name scezju for chrome
// @namespace http://ycjy.scezju.com/
// @version 0.1
// @description IE go away!
// @author mzb
// @domain ycjy.scezju.com
// @match http://ycjy.scezju.com/*
// @grant none
// @require http://code.jquery.com/jquery-latest.js
<div style="text-align: center;">
<style>
#submit{
float: center;
width: 90%;
height: 40;
font-size: large;
margin: 15 0 0 0;
color: #fff;
background: #6cf;
@maizhibin
maizhibin / Use jdbc execute query
Created September 12, 2013 14:38
Use jdbc execute query
Connection conn = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
//System.out.println(((DruidDataSource) ((LazyConnectionDataSourceProxy)
//SpringUtils.getBean("dataSource")).getTargetDataSource()).getRawJdbcUrl());
String sql = "select * from erp_user where login_id=? and password=?";
conn = DBUtil.getConnection();
stmt = conn.prepareStatement(sql);
stmt.setString(1, "name");
@maizhibin
maizhibin / mysqldump_all_databases
Created January 30, 2013 06:05
mysqldump all databases
mysqldump --all-databases -uroot -p --opt --add-drop-database --add-drop-table --events --triggers --routines --default-character-set=utf8 --master-data=2 --single-transaction --complete-insert --quote-names --log-error=/tmp/mysqldump20120305.log >/home/mysql/mysqlbackup/logs_backup_20120305.mysql