Skip to content

Instantly share code, notes, and snippets.

View marsyang1's full-sized avatar

marsyang1 marsyang1

  • Taichung,Taiwan
View GitHub Profile
@marsyang1
marsyang1 / TestGuavaCache.java
Last active December 6, 2016 03:02
Guava Cache Sample
package com.gsmc.tool;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.Maps;
import com.google.common.math.DoubleMath;
import lombok.extern.slf4j.Slf4j;
import org.junit.Assert;
@marsyang1
marsyang1 / rsync_note.md
Last active October 17, 2016 01:58
rsync_note
@marsyang1
marsyang1 / setenv.sh
Last active August 30, 2016 21:56
customize confluence setenv.sh
# See the CATALINA_OPTS below for tuning the JVM arguments used to start Confluence.
echo "If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide"
# set the location of the pid file
if [ -z "$CATALINA_PID" ] ; then
if [ -n "$CATALINA_BASE" ] ; then
CATALINA_PID="$CATALINA_BASE"/work/catalina.pid
elif [ -n "$CATALINA_HOME" ] ; then
CATALINA_PID="$CATALINA_HOME"/work/catalina.pid
@marsyang1
marsyang1 / mysql_add_user
Created August 30, 2016 02:21
mysql add user and grant user example
CREATE USER 'confluence'@'%' IDENTIFIED BY 'confluence';
GRANT ALL ON confluence.* TO 'confluence'@'%';
@marsyang1
marsyang1 / SimpleHTTPServer-http-file-server
Last active June 14, 2017 05:16
SimpleHTTPServer-http-file-server-by-python
# http://stackoverflow.com/questions/12571804/lightweight-localhost-file-server-for-mac
cd path/to/files
python -mSimpleHTTPServer
or
python -mSimpleHTTPServer 2343
@marsyang1
marsyang1 / emby-server-docker.sh
Last active March 27, 2020 14:00
emby-server-docker
docker run -d \
-p 8096:8096 \
-p 8920:8920 \
-v /home/ubuntu/emby_home:/home/ubuntu/emby_home \
-e "APP_USER=appuser" \
-e "APP_CONFIG=/home/ubuntu/emby_home" \
emby/embyserver
# http://www.htpcbeginner.com/guide-install-emby-iptv-plugin/
# https://www.hlsplayer.net/
@marsyang1
marsyang1 / restart-tomcat.yml
Last active April 9, 2024 07:41
ansible-restart tomcat playbook
# host usually use all , sometime and apply to some server role
# but also can use ansible-playbook with --limit , more dynamicly
# reference
# https://gist.github.com/gomes/7697353
# http://stackoverflow.com/questions/3510673/find-and-kill-a-process-in-one-line-using-bash-and-regex
# kill $(ps aux | grep '[/]home/testworkspace/qleoffice' | awk '{print $2}')
- hosts: all
# sudo permission
become: true
@marsyang1
marsyang1 / INV
Last active August 15, 2016 10:05
vagrant-ubuntu-ansible-docker.yml
# Generated by vag2inv
# Cmdline: vag2inv --vm -f INV
# @see https://github.com/William-Yeh/vag2inv
default ansible_host=192.168.5.238 ansible_port=22 ansible_user=vagrant ansible_ssh_pass=123456 ansible_become_user=root ansible_become_pass=123456
@marsyang1
marsyang1 / choco_command_list.md
Last active August 30, 2018 17:25
use chocolatey to prepare develop environment.
  • list installed
  • chocolatey list -localonly
  • choco list -lo
  • update
  • choco version all
  • choco outdated
  • upgrade
  • cup all
  • cup cmder ....
  • reference
@marsyang1
marsyang1 / IntelliJ IDEA use compass with sass
Created August 11, 2016 09:11
IntelliJ IDEA use compass with sass
gem install compass
#will install with sass , scss
gem install sass-globbing
https://blog.jetbrains.com/webstorm/2013/12/using-compass-in-webstorm/