Skip to content

Instantly share code, notes, and snippets.

View pcbill's full-sized avatar

Shin Jan Wu pcbill

  • Kaohsiung, Taiwan
View GitHub Profile
@pcbill
pcbill / SOAPConfig.java
Created October 1, 2019 05:13
Soap, webservice example in spring boot
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;
@Configuration
public class SOAPConfig {
@Bean
public Jaxb2Marshaller marshaller() {
Jaxb2Marshaller marshaller = new Jaxb2Marshaller();
// this is the package name specified in the <generatePackage> specified in
@pcbill
pcbill / UdpServer.kt
Created June 12, 2018 00:49 — forked from codingtim/UdpServer.kt
Simple udp server with netty 4.1 and kotlin
import io.netty.bootstrap.Bootstrap
import io.netty.channel.ChannelHandlerContext
import io.netty.channel.SimpleChannelInboundHandler
import io.netty.channel.nio.NioEventLoopGroup
import io.netty.channel.socket.nio.NioDatagramChannel
import io.netty.util.CharsetUtil
import io.netty.util.concurrent.DefaultThreadFactory
import kotlinx.coroutines.experimental.async
import kotlinx.coroutines.experimental.newFixedThreadPoolContext
@pcbill
pcbill / build.gradle
Created December 20, 2016 06:01
jar, lib, sh 封裝成 zip package
task copyTask << {
println "copy"
copy {
from "src/main/resources"
from "build/libs"
include "**/*.jar"
include "**/*.yml"
include "**/*.sh"
@pcbill
pcbill / gist:6701af7caf6bfad3abb9413b351e4619
Created December 20, 2016 05:37
bash 參數空白防呆
#!/bin/bash
if [[ -z $1 ]]; then
echo "Please provide the target environment. ex: dev or prod"
exit 1
fi
@pcbill
pcbill / index.html
Last active August 29, 2015 14:20
index.html for Reactjs sample
<html>
<head>
<title>this is a title</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/3.0.2/normalize.css">
<!-- react -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.1/JSXTransformer.js"></script>
@pcbill
pcbill / ie8_com
Last active August 29, 2015 14:17
Reactjs, ie8 相容
Reactjs, ie8 相容
==================
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <script src="/js/react/es5-shim.js" language="javascript" />
- <script src="/js/react/es5-sham.js" language="javascript" />
- 不能用 /js/react/JSXTransformer-0.12.1.js
@pcbill
pcbill / .gitignore
Created March 19, 2015 04:22
git ignore
.gradle
.idea
talkevent.ipr
talkevent.iws
talkevent.iml
/bin/
.classpath
.project
.settings/
build/
@pcbill
pcbill / build.gradle(spring_boot_web_jpa)
Last active August 29, 2015 14:17
build.gradle(spring_boot_web_jpa)
buildscript {
repositories {
maven { url "https://repo.spring.io/libs-release" }
mavenLocal()
mavenCentral()
}
dependencies {
classpath( "org.springframework.boot:spring-boot-gradle-plugin:1.2.3.RELEASE" )
}
}
@pcbill
pcbill / gradle.properties
Created February 2, 2015 07:03
the proxy setting in gradle.properties
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
@pcbill
pcbill / build.gradle(geb_spock)
Last active August 29, 2015 14:14
Geb + Spock dependency
apply plugin: 'eclipse'
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile "org.codehaus.groovy:groovy-all:2.3.6"