This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #commit a739014b596c8feff37426cb8ff22d72aad86bcb | |
| # Author: vrandkode <vrandkode@gmail.com> | |
| # adding base domain trace. last commit | |
| #commit de12d72f1edeb3fca500e3aab2e884a2a48ffd05 | |
| # Author: vrandkode <vrandkode@gmail.com> | |
| # working commit | |
| # git push <remote> +<commit-id>^:<branch> | |
| # revert to commit's parent: de12d72f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| How to enable multiple remote connection for windows server 2012 | |
| 1. gpedit.msc and open it | |
| 2. Go to computer configuration -> Administrative Tempalates -> Wondows Components | |
| -> Remote Desktop services -> Remote Desktop Session Host -> Connections. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir src | |
| /usr/java/jdk1.8.0_60/bin/jar xvf <fat-jar-with-dependencies>.jar | |
| /usr/java/jdk1.8.0_60/bin/java -Dprop=value -cp src com.example.MainClass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ yum group install "Development Tools" -y | |
| $ wget http://download.mono-project.com/sources/mono/mono-4.2.2.30.tar.bz2 | |
| $ tar jxf mono-4.2.2.30.tar.bz2 | |
| $ cd mono-4.2.2 | |
| $ ./configure --prefix=/opt/mono | |
| $ make && make install | |
| # Append following lines to profile bash: ~/.bash_profile | |
| $ export PKG_CONFIG_PATH=/opt/mono/lib/pkgconfig | |
| $ export PATH=$PATH:/opt/mono/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo iptables --flush | |
| sudo iptables -A INPUT -p tcp -s X.X.X.X --dport 22 -j ACCEPT | |
| sudo iptables -A INPUT -p tcp --dport=22 -j DROP | |
| sudo iptables-save |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download the binary and installing under /opt | |
| wget https://services.gradle.org/distributions/gradle-2.6-bin.zip | |
| unzip gradle-2.6-bin.zip | |
| mv gradle-2.6 /opt/gradle | |
| # Edit bash profile as following ~/.bash_profile | |
| # export GRADLE_HOME=/opt/gradle/bin | |
| # PATH=$PATH:$GRADLE_HOME |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Skipping the license | |
| wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.rpm" | |
| # Installing the RPM | |
| sudo yum localinstall jdk-8u60-linux-x64.rpm | |
| # Removing the trace | |
| rm jdk-8u60-linux-x64.rpm | |
| # Append JAVA_HOME under .bash_profile | |
| # export JAVA_HOME=/usr/java/jre1.8.0_60 | |
| # PATH=$PATH:$JAVA_HOME/bin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| service="servicename" | |
| exe="Service.exe" | |
| mono=/usr/local/bin/mono | |
| logs_path=logs | |
| pid_file="/var/run/services/$service.pid" | |
| get_pid() { | |
| cat "$pid_file" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Reflection; | |
| namespace Assemblies { | |
| class MainClass | |
| { | |
| public static void Main (string[] args) | |
| { | |
| Console.WriteLine (args[0]); | |
| Assembly assembly = Assembly.LoadFrom(args[0]); | |
| Version ver = assembly.GetName().Version; |