Skip to content

Instantly share code, notes, and snippets.

View rankun203's full-sized avatar
🔨
building things

Kun R rankun203

🔨
building things
View GitHub Profile
@rankun203
rankun203 / WeatherController.java
Created October 28, 2013 07:40
Java attach http proxy
//attach http proxy
System.setProperty("http.proxyHost", "127.0.0.1");
System.setProperty("http.proxyPort", "8087");
@rankun203
rankun203 / dispatcher-servlet.xml
Created October 29, 2013 00:44
SpringMVC配置/WEB-INF/pages下的视图
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
@rankun203
rankun203 / GreetingController.java
Last active December 26, 2015 20:19
SpringMVC 指定返回页面的两种方式
@RequestMapping("/")
public ModelAndView welcome (ModelMap model) {
ModelAndView view = new ModelAndView("index");
model.addAttribute("introSelf", "I'm Spring, I'm Coming.");
return view;
}
@RequestMapping("/")
public String welcome (ModelMap model) {
model.addAttribute("introSelf", "I'm Spring, I'm Coming.");
$(function () {
$('#exercise-stat-chart-2').highcharts({
title: {
text: ''
},
xAxis: {
title: {
text: '课次'
},
allowDecimals: false,
@rankun203
rankun203 / style.css
Created November 12, 2013 11:50
CSS properties backup
font: 12px "微软雅黑","黑体","Microsoft Yahei","SimHei",Arial,sans-serif;

#一些互联网使用方法 ###目录:

  1. youtube下载视频(包括1080p).
  2. 翻墙.
  3. 不翻墙使用Google Search.
  4. 关于本文.
  5. 解释

###youtube下载视频

@rankun203
rankun203 / idea_shortcut.md
Last active December 30, 2015 02:29
IntelliJ IDEA Shortcut

ctrl + F12 查看文件结构。

From: http://askubuntu.com/a/107735/85224

First install this:

sudo apt-get install imagemagick mplayer gtk-recordmydesktop

those are the required stuff, ImageMagick, MPlayer and Desktop Recorder. Then use Desktop Recorder to capture a portion of the screen/application to use as the screencast. After the Desktop Recorder has saved the recording into an OGV video, MPlayer will be used to capture JPEG screenshots, saving them into the 'output' directory.

On a terminal:

@rankun203
rankun203 / bash.sh
Last active December 31, 2015 14:09
一些常用的bash命令
#统计文件数目
ls -l |grep "^-" | wc -l
#批量改名
for files in `ls *`
do
mv $files `echo "xxx_$i.jpg"`
let "i++"
done
@rankun203
rankun203 / genFileKey.js
Created February 13, 2016 10:36
function genFileKey()
/**
* 根据文件名生成文件的 key
* @param fileName
* @returns {string}
*/
function genFileKey(fileName) {
var fileKey = '';
// 将文件名中的有效字符提取出来作为文件 key
var realFileName = fileName.match(/[\w|\.]/g).join('');