Skip to content

Instantly share code, notes, and snippets.

@kunst1080
kunst1080 / sed.bat
Last active December 18, 2015 21:09
sedっぽことをするためのBATファイル@がんばらない
@if (1==1) /*
@echo off
if "%~1"=="" goto :USAGE
if "%~1"=="/?" goto :USAGE
rem ********************************************************************************
:MAIN
CScript //nologo //E:JScript "%~f0" %*
If ERRORLEVEL 1 goto :USAGE
@Grapes([
@Grab('org.spockframework:spock-core:0.7-groovy-2.0'),
@GrabExclude('org.codehaus.groovy:groovy-all')])
import spock.lang.*
class HelloSpock extends Specification {
def "おーるどどーなってんの?"() {
setup:
def list = [1, 2, 3]
@grimrose
grimrose / build.gradle
Created May 7, 2013 17:10
Copyタスクを使ってdependenciesを振り分ける場合
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile 'org.slf4j:slf4j-api:1.7.5'
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.backupagentsample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
@nobeans
nobeans / build.gradle
Last active December 16, 2015 14:29 — forked from vvakame/build.gradle
import groovy.xml.MarkupBuilder
apply plugin: "java"
apply plugin: "war"
apply plugin: "eclipse"
// maven-publish, maven2Gradle, build-dashboard
// checkstyle, findbugs, jdepend, pmd
@msakamoto-sf
msakamoto-sf / start_jetty.groovy
Last active January 5, 2021 19:54
Jetty + GroovyServlet + Groovy Script = Start Jetty Anywhere !! You only need Groovy :)
@Grapes([
@Grab('org.eclipse.jetty.aggregate:jetty-all:8.1.10.v20130312'),
@Grab('com.h2database:h2:1.3.171'),
@Grab('javax.servlet:servlet-api:2.5'),
])
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.servlet.*
import org.eclipse.jetty.webapp.*
import javax.servlet.*
import javax.servlet.http.*
@alterakey
alterakey / android-jdb-attach.sh
Created March 3, 2013 15:43
Android debugger attacher
#!/bin/sh
pid="$1"
if test -z "$pid"; then
echo "usage: $0 <pid>"
echo "debuggable PIDs:"
adb jdwp
exit 1
fi
adb forward tcp:8600 jdwp:"$1"
rlwrap jdb -attach localhost:8600
@alterakey
alterakey / TwitterAuthService.java
Last active December 11, 2015 20:48
One-off, in-app, Twitter4j sign-on example
/*
* Copyright 2013 Takahiro Yoshimura
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@timyates
timyates / abacus.groovy
Last active December 11, 2015 10:19
A GroovyFX version of the Canoo JavaFX Abacus tutorial part iii
@Grab('org.codehaus.groovyfx:groovyfx:0.3.1')
import static groovyx.javafx.GroovyFX.start
final int ROW_COUNT = 10
final int COL_COUNT = 10
final int RADIUS = 20
final int DIAMETER = 2 * RADIUS
final int WIDTH = COL_COUNT * DIAMETER
final int HEIGHT = ROW_COUNT * DIAMETER
final int MOVE_WAY = 100
@u1aryz
u1aryz / build.gradle
Last active December 10, 2015 11:38
build.gradle for Slim3 + JPP
apply plugin: "java"
sourceCompatibility = 1.6
targetCompatibility = 1.6
buildDir = "target"
def slim3Version = "1.0.+"
def appengineVersion = "1.7.+"
def jppVersion = "1.5.+"