Skip to content

Instantly share code, notes, and snippets.

View rainmore's full-sized avatar

Jie Rong (Felix) rainmore

View GitHub Profile
@rainmore
rainmore / trilium-docker-compose.yml
Created February 21, 2020 23:42
Trilium Docker Compose File
version: '3.5'
services:
trilium:
image: zadam/trilium:latest
container_name: trilium
restart: always
hostname: trilium
domainname: localhost
ports:
@rainmore
rainmore / .vimrc
Created July 27, 2019 01:32
Default vim config
set tabstop=4 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=4 " Indents will have a width of 4
set softtabstop=4 " Sets the number of columns for a TAB
set expandtab " Expand TABs to spaces
@rainmore
rainmore / .editorconfig
Last active July 26, 2019 23:16
Base Project
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 *.jar
@rainmore
rainmore / docker-compose.yml
Last active January 21, 2018 11:07
Email Gateway Docker Compose File v3.3
version: '3.3'
services:
nodejs:
image: rainmore/email-gateway-nodejs:1.0.1
container_name: email-gateway-nodejs
hostname: email-gateway-nodejs
restart: always
env_file: /etc/rainmore/email-gateway/environment
#logging:
@rainmore
rainmore / mail
Created March 13, 2017 12:41
Scala Codes
def mail(to: String, subject: String, body: String): Unit = {
Try {
val command = Array("/bin/sh", "-c", "echo '%s'| mail -s '%s' %s".format(body, subject, to))
Runtime.getRuntime.exec(command)
} match {
case Success(_) => logger.info("message send successfully")
case Failure(ex) => logger.error(ex.getMessage)
}
}
// stop distZip, distTar and stop upload zip and tar
[distZip, distTar].each { task ->
configurations.archives.artifacts.removeAll {
it.class.simpleName == "ArchivePublishArtifact" && it.archiveTask == task
}
task.enabled = false
}
@rainmore
rainmore / Getter
Last active December 3, 2016 09:18
IntelliJ IDEA
#if($field.modifierStatic)
static ##
#end
$field.type ##
#set($name = $StringUtil.capitalizeWithJavaBeanConvention($StringUtil.sanitizeJavaIdentifier($helper.getPropertyName($field, $project))))
#if (($field.boolean && $field.primitive) || $field.Boolean)
#if ($StringUtil.startsWithIgnoreCase($name, 'is'))
#set($name = $StringUtil.decapitalize($name))
#else
is##
@rainmore
rainmore / .gitconfig
Last active May 21, 2019 12:08
Configurations
[user]
name = Felix Jie Rong
email = rainmore24@gmail.com
[alias]
st = status
pr = pull --rebase
unadd = reset HEAD --
st = status -sb
ci = commit
co = checkout