Skip to content

Instantly share code, notes, and snippets.

View frankies's full-sized avatar
🎯
Focusing

frankies frankies

🎯
Focusing
View GitHub Profile
@frankies
frankies / Jenkinsfile
Created July 16, 2020 02:51 — forked from tonespy/Jenkinsfile
Jenkins Pipeline Jenkinsfile
// Every jenkins file should start with either a Declarative or Scripted Pipeline entry point.
node {
//Utilizing a try block so as to make the code cleaner and send slack notification in case of any error
try {
//Call function to send a message to Slack
notifyBuild('STARTED')
// Global variable declaration
def project = 'sa-android'
def appName = 'Sample App'
@frankies
frankies / Dockerfile
Created July 16, 2020 02:50 — forked from tonespy/Dockerfile
Android Development Area Docker
FROM ubuntu:latest
RUN cd /opt
RUN mkdir android-sdk-linux && cd android-sdk-linux/
RUN apt-get update -qq \
&& apt-get install -y openjdk-8-jdk \
&& apt-get install -y wget \
&& apt-get install -y expect \
@frankies
frankies / gradle.properties
Created June 7, 2018 03:00
gradle 全局设置,以下文件放到~/.gradle下
org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xms512m -Xmx1024m
org.gradle.workers.max=100
#org.gradle.jvmargs=-Xmx2g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
@frankies
frankies / JSONUserType.java
Created September 1, 2017 02:14 — forked from fabriziofortino/JSONUserType.java
Hibernate JSONUserType with Jackson
package com.keepithttps.hibernate.type;
import java.io.IOException;
import java.io.Serializable;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.Properties;
@frankies
frankies / RestfulWsHelper.java
Created August 11, 2017 10:28
获取Web请求客户端的IP,
public abstract class RestfulWsHelper {
private final static String HEADER_NAME_REMOTE_IP = RestfulWsHelper.class.getSimpleName() + ".__REMOTE_CLIENT_ID__";
public final static String UNKNOW_CLIENT_IP = "UNKNOWN";
final static String[] SEARCHING_HEADERS = new String[] {
"x-forwarded-for",
"Proxy-Client-IP",
"WL-Proxy-Client-IP"
};
@frankies
frankies / qa.md
Created July 3, 2017 03:59
问题

问题点

DbStatusHelper.java

  • 是否需要继承 DefCollectionHelperSupport 类?

    我的想法: 这个类在G1是用于用户界面的下拉框数据集合获取的

  • 注入 ServletContext 这个对象?

  • 自定义一个函数calculate 创建脚本,
CREATE OR REPLACE FUNCTION calculate(IN x double precision, IN y double precision, OUT sum double precision) RETURNS double precision AS $BODY$ BEGIN sum = x + y; END; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; 
  • 在JPA 中调用
@frankies
frankies / 0_reuse_code.js
Created June 29, 2017 03:36
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console