Skip to content

Instantly share code, notes, and snippets.

View marsyang1's full-sized avatar

marsyang1 marsyang1

  • Taichung,Taiwan
View GitHub Profile
@marsyang1
marsyang1 / build.gradle
Created May 18, 2016 02:51 — forked from edwardbeckett/build.gradle
mysema.querydsl gradle
sourceSets {
generated {
java {
srcDirs = ['src/main/generated']
}
}
}
configurations {
querydslapt
version: '2'
services:
db-mysql-test:
image: mysql
container_name: db-mysql-test
environment:
- MYSQL_ROOT_PASSWORD=1234
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
wordpress:
image: wordpress
@marsyang1
marsyang1 / ubuntu-install-wordpress.sh
Last active May 19, 2016 18:43
ubuntu-install-wordpress.sh
# reference : https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04
cd ~ && apt-get update -y && apt-get install -y wget lsb-release nginx php-fpm rsync vim \
&& debconf-set-selections <<< 'mysql-server mysql-server/root_password password 1234' \
&& debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password 1234' \
&& echo "[client]
user=root
password=1234
host=localhost" > ~/.my.cnf \
&& apt-get update && apt-get install -y mysql-server && service mysql start \
&& echo "create database wordpress" | mysql -u root \
#http://stackoverflow.com/questions/15337409/updating-property-value-in-properties-file-without-deleting-other-values
FileInputStream in = new FileInputStream("First.properties");
Properties props = new Properties();
props.load(in);
in.close();
FileOutputStream out = new FileOutputStream("First.properties");
props.setProperty("country", "america");
props.store(out, null);
out.close();
@marsyang1
marsyang1 / install.txt
Created July 18, 2016 10:09
Ubuntu install virtualbox and vagrant
# https://www.liberiangeek.net/2014/09/install-virtualbox-headless-ubuntu-14-04-server-manage-phpvirtualbox/
# http://www.olindata.com/blog/2014/07/installing-vagrant-and-virtual-box-ubuntu-1404-lts
# https://www.godaddy.com/garage/tech/config/install-vagrant-ubuntu-14-04/
# http://superuser.com/questions/845987/how-do-i-upgrade-vagrant-to-last-version-in-ubuntu
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo apt-get install build-essential dkms
sudo vi /etc/apt/sources.list.d/virtualbox.list
deb http://download.virtualbox.org/virtualbox/debian trusty contrib
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update && sudo apt-get install VirtualBox5.0
@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/
@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 / 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 / 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 / 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/