-
add-apt-repository ppa:webupd8team/java
-
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
-
add-apt-repository 'deb http://ftp.utexas.edu/mariadb/repo/10.1/ubuntu trusty main'
-
apt-get update; apt-get upgrade
-
apt-get install screen whois git npm nodejs-legacy nodejs oracle-java8-installer software-properties-common mariadb-server
-
groupadd tomcat
-
useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
This file contains 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 (var client = new HttpClient()) | |
{ | |
var request = new HttpRequestMessage() | |
{ | |
RequestUri = new Uri("http://google.com/"), | |
Method = HttpMethod.Get | |
}; | |
request.Headers.Add("Content-Type", "application/json; charset=utf-8"); | |
var response = client.SendAsync(request).Result; |
This file contains 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
description "Tomcat Server" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
setuid tomcat | |
setgid tomcat |
This file contains 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
public class AppPath { | |
public String getAppPath() { | |
URL url; | |
String extURL; | |
Class anyClass = this.getClass(); | |
try { | |
url = anyClass.getProtectionDomain().getCodeSource().getLocation(); |
This file contains 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
for k in `ls`; do echo "Getting latest for $k"; cd $k; git fetch; git pull; cd ..; done |
This file contains 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
position: fixed; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); |
This file contains 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 21, host: 2121 |
This file contains 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
<!--[if lt IE 9]> | |
<script src="//html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script> | |
<![endif]--> |
This file contains 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
(function($){ | |
var div; | |
$.fn.outerHTML = function() { | |
var elem = this[0], | |
tmp; | |
return !elem ? null | |
: typeof ( tmp = elem.outerHTML ) === 'string' ? tmp | |
: ( div = div || $('<div/>') ).html( this.eq(0).clone() ).html(); |
This file contains 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
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout site.key -out site.crt |
OlderNewer