Skip to content

Instantly share code, notes, and snippets.

View greenlaw110's full-sized avatar
🏠
Working from home

Gelin Luo greenlaw110

🏠
Working from home
  • @AWS/Redshift/CP
  • Sydney Australia
View GitHub Profile
@greenlaw110
greenlaw110 / issue-install-wine-on-mint-19.2
Created October 29, 2019 03:39
Issue installing wine on mint 19.2
root@luog-X510UQR:~# sudo apt install --install-recommends winehq-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
public static void main(String[] args) throws Exception {
long ts = $.ms();
final OkHttpClient http = new OkHttpClient.Builder().build();
final AtomicInteger backlog = new AtomicInteger(100000);
final AtomicInteger exceptions = new AtomicInteger(0);
ExecutorService exec = Executors.newFixedThreadPool(100);
for (int i = 0; i < 150; ++i) {
exec.submit(new Runnable() {
@Override
public void run() {
@greenlaw110
greenlaw110 / DisableClientCacheInterceptor.java
Created October 22, 2019 07:20
Intercepter to disable client cache for all endpoints - ActFramework
import act.util.Global;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDateTime;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;
import org.osgl.$;
import org.osgl.aaa.NoAuthentication;
import org.osgl.http.H;
import org.osgl.mvc.annotation.After;
import org.osgl.util.S;
@greenlaw110
greenlaw110 / beetlsql.stack
Created July 1, 2019 13:11
beetlsql issue
ANTLR Tool version 4.7.2 used for code generation does not match the current runtime version 4.5.3ANTLR Runtime version 4.7.2 us23:06:50.978 [XNIO-1 task-4] ERROR a.x.NetworkHandler - Fatal Error encountered handling request:
java.lang.ExceptionInInitializerError: null
at org.beetl.core.engine.DefaultTemplateEngine.createProgram(DefaultTemplateEngine.java:36)
at org.beetl.sql.core.engine.SQLTemplateEngine.createProgram(SQLTemplateEngine.java:17)
at org.beetl.core.GroupTemplate.loadTemplate(GroupTemplate.java:573)
at org.beetl.core.GroupTemplate.getTemplateByLoader(GroupTemplate.java:526)
at org.beetl.core.GroupTemplate.getTemplate(GroupTemplate.java:503)
at org.beetl.sql.core.SQLScript.run(SQLScript.java:76)
at org.beetl.sql.core.SQLScript.run(SQLScript.java:66)
at org.beetl.sql.core.SQLScript.select(SQLScript.java:326)
public class FastJsonIssue {
public static class Record {
@JSONField(format = "yyyy-MMM-dd")
public Date date1 = new Date();
@JSONField(format = "yyyyMMdd")
public Date date2 = date1;
@JSONField(format = "yyyy_MM_dd hh:mm")
public DateTime dateTime = DateTime.now();
@greenlaw110
greenlaw110 / routes.conf
Created January 4, 2018 03:49
A complex route table for routing benchmark
# Routes
# This file defines all application routes (Higher priority routes first)
# ~~~~
#Runtime
GET /yemian/{yemianId}/ CMYingyong.jiazaiYemian
* /tuiguang/{tuiguangId}/ CMYingyong.jiazaiTuiguang
GET /jilu/{jiluId} CMYingyong.jilu
GET /toupiao CMYingyong.toupiao
GET /tandcdialog CMYingyong.tAndCDialog
@greenlaw110
greenlaw110 / create-act-app.sh
Created January 3, 2018 01:10
Simple way to create actframework app project skeleton
wget https://github.com/actframework/act-starter-kit/archive/master.zip && unzip master.zip && ./act-starter-kit-master/act-new.sh
@greenlaw110
greenlaw110 / javadoc.css
Last active September 17, 2017 11:59
my javadoc stylesheet
body {
background-color:#222222;
color:#D2DECA;
font-family: serif;
font-size:16px;
margin:0;
}
a:link, a:visited {
text-decoration:none;
color:#999;
@greenlaw110
greenlaw110 / xyz.md
Last active September 13, 2017 11:26
head1 head 2
3 5
  • list 1
  • list 2
Hello Markdown

...

@greenlaw110
greenlaw110 / act-release-notes-20170911.md
Last active September 10, 2017 21:39
ACT Release Notes - 1.4.11

ActFramework Release notes for 1.4.11

Change log

  • catch up update to 1.3.14-LTS
  • Support running CLI Job in background #267
  • job.list CLI command failure #355

The followings are catch up from 1.3.14-LTS