Skip to content

Instantly share code, notes, and snippets.

@aruis
aruis / gist:d4df626295aafa76cd45
Created July 1, 2015 06:17
groovy sum code line
import groovy.io.FileType
/**
* Created by liurui on 14/11/12.
*/
def len = 0;
def dir = new File('/Users/liurui/develop/workspace/CM8/flexweb/src')
if (dir.isDirectory()) {
@aruis
aruis / build.gradle
Created July 1, 2015 06:23
package jar
group 'com.aruistar'
version '1.0-SNAPSHOT'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:1.2.1"
}
@aruis
aruis / ScriptCenter.groovy
Created July 6, 2015 06:20
动态生成脚本
package com.aruistar.controller
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.ResponseBody
/**
* Created by liurui on 15/7/1.
*/
@aruis
aruis / print.js
Created July 10, 2015 06:41
html print
var oldDocumentBody;
function CallPrint(item) {
// Sauvegarde de la page actuelle
oldDocumentBody = document.body.innerHTML;
// Desactivation des limites de tailles afin de charger la totalité du tableau
item.style.width = "";
item.style.height = "";
item.style.overflow = "";
<s:Graphic x="100" y="0">
<!-- Use Use compact syntax with absolute coordinates. -->
<s:Path data="M 20 0
C 50 0 50 35 20 35
L 15 35
L 15 45
L 0 32
L 15 19
L 15 29
L 20 29
@aruis
aruis / gist:c83efcb1239f67c6a9d7
Created August 18, 2015 11:35
angular controller
<!DOCTYPE html>
<html ng-app="gemStore">
<head>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css" />
<script type="text/javascript" src="angular.min.js"></script>
<script>
(function(){
var gem = { name: 'Azurite', price: 2.95 };
var app = angular.module('gemStore', []);
<!doctype html>
<html>
<head>
<script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
<link rel='stylesheet' type='text/css' href='/resources/tutorial/css/example.css'>
</head>
<body>
<div id='messagesDiv'></div>
<input type='text' id='nameInput' placeholder='Name'>
@aruis
aruis / Default-568h@2x.png
Created December 14, 2015 06:38 — forked from uebo/Default-568h@2x.png
iOS Sample Launch Screen File
Default-568h@2x.png
import org.apache.poi.hssf.usermodel.HSSFCell
import org.apache.poi.hssf.usermodel.HSSFDateUtil
import org.apache.poi.hssf.usermodel.HSSFRow
import org.apache.poi.hssf.usermodel.HSSFWorkbook
/**
* Groovy Builder that extracts data from
* Microsoft Excel spreadsheets.
* @author Goran Ehrsson
*/
import groovy.sql.Sql
/**
*
* Created by liurui on 16/1/15.
*/
Sql db = Sql.newInstance("jdbc:jtds:sqlserver://192.168.180.12:1433/yseap_lrtest;instance=sql2008", "yseap", "189CF2F7-6734-4EFA-AB47-302A69674E3C", "net.sourceforge.jtds.jdbc.Driver")