Skip to content

Instantly share code, notes, and snippets.

@bianle
bianle / common.md
Last active November 14, 2017 14:13

jquery

<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.js"></script>

easyui

<link rel="stylesheet" type="text/css" href="http://res.bovod.org/jquery-easyui/1.4.5/themes/default/easyui.css">
<script src="http://res.bovod.org/jquery-easyui/1.4.5/jquery.easyui.min.js"></script>
@bianle
bianle / vpn-centos6.sh
Created November 9, 2017 06:53
centos6安装vpn脚本
#!/bin/bash
function installVPN(){
echo "begin to install VPN services";
#check wether vps suppot ppp and tun
yum remove -y pptpd ppp
iptables --flush POSTROUTING --table nat
iptables --flush FORWARD
rm -rf /etc/pptpd.conf
@bianle
bianle / eamcs.md
Last active December 17, 2016 15:25
emacs
``` lisp
;;------------------------------------------------------------------
;; copy a line
;;------------------------------------------------------------------
(defun copy-line (arg)
"Copy lines (as many as prefix argument) in the kill ring"
(interactive "p")
(kill-ring-save (line-beginning-position)
(line-beginning-position (+ 1 arg)))
(message "%d line%s copied" arg (if (= 1 arg) "" "s")))
@bianle
bianle / easyui.md
Created November 9, 2016 07:04
easyui

列宽自适应

fitColumns:true
@bianle
bianle / ReadImg.java
Created October 29, 2016 02:53
java读取图片
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
@bianle
bianle / command.md
Created September 28, 2016 06:27
linux command

-解压

tar -xzvf .tar.gz
@bianle
bianle / randomColor.js
Created September 22, 2016 08:43
js随机颜色
var getRandomColor = function(){
return '#'+('00000'+(Math.random()*0x1000000<<0).toString(16)).substr(-6);
}
@bianle
bianle / snap.md
Created August 31, 2016 07:05
ftl 常用标签
  • list大小
<#if (someList?size>0) ></#if>
@bianle
bianle / Receiver.java
Created July 7, 2016 06:32
java socket demo
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.net.InetAddress;
import java.net.NetworkInterface;
@bianle
bianle / 加到服务.bat
Created June 28, 2016 06:26
windows bat 整理
sc create myServerName c:\path\my.exe