Skip to content

Instantly share code, notes, and snippets.

View backslash112's full-sized avatar
🎯
Focusing

Cun Yang backslash112

🎯
Focusing
View GitHub Profile
@backslash112
backslash112 / install-tomcat-8.5.14.sh
Created March 18, 2018 04:12 — forked from Clivern/install-tomcat-8.5.14.sh
How to Install Apache Tomcat 8 on Ubuntu 16.04
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip
sudo unzip apache-tomcat-8.5.15.zip
sudo mv apache-tomcat-8.5.15 tomcat
@backslash112
backslash112 / install-tomcat-8.5.14.sh
Created March 18, 2018 04:12 — forked from Clivern/install-tomcat-8.5.14.sh
How to Install Apache Tomcat 8 on Ubuntu 16.04
#!/bin/bash
# For More Info http://clivern.com/how-to-install-apache-tomcat-8-on-ubuntu-16-04
sudo apt-get update
sudo apt-get install default-jdk
sudo apt-get install unzip
cd /opt
curl -O http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v8.5.15/bin/apache-tomcat-8.5.15.zip
sudo unzip apache-tomcat-8.5.15.zip
sudo mv apache-tomcat-8.5.15 tomcat
@backslash112
backslash112 / open_vim_file_in_iterm.sh
Last active August 22, 2023 11:12
Use vim to open a file in iTerm2 from IntelliJ IDEA
#!/bin/sh
vim="vim $1 $2 $3"
osascript -e "
tell application \"iTerm\"
set myterm to (create window with default profile)
tell myterm
activate current session
launch session \"Default Session\"
tell the current session

Script to install docker and docker-compose for ubuntu 16.04
Docker version 18.03.0-ce, build 0520e24
docker-compose version 1.21.0, build 5920eb0

Install docker-ce

sudo apt-get update \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - \
&& sudo add-apt-repository \

"deb [arch=amd64] https://download.docker.com/linux/ubuntu \

Script to install zsh and oh-my-zsh for ubuntu 16.04

Install zsh

apt install zsh

Install oh-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Plugins for ~/.zshrc

plugins=(

@backslash112
backslash112 / install-spark-with-docker.md
Last active April 18, 2018 18:42
QuickStart: Try Spark with Docker
@backslash112
backslash112 / DemoServlet.java
Last active May 15, 2018 02:30
Blog: Create Maven Project with Servlet in IntelliJ IDEA 2018
@WebServlet("/DemoServlet")
public class DemoServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<h3>Hello World!</h3>");
}
}
@backslash112
backslash112 / pom.xml
Created May 15, 2018 02:34
Blog: Create Maven Project with Servlet in IntelliJ IDEA 2018
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
@backslash112
backslash112 / docker-pull.sh
Created May 16, 2018 14:22
Blog: Start a Remote MySQL Server with Docker quickly
docker pull mysql/mysql-server:latest