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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$("button").click(function(){ | |
$.getJSON("http://localhost:9099/helloworld/json?param1=" + encodeURIComponent(document.getElementById("urls").innerHTML),function(result){ | |
$.each(result, function(i, field){ | |
$("#items").append(i + " " + field + " "); |
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
import java.io.IOException; | |
import java.net.InetSocketAddress; | |
import java.nio.ByteBuffer; | |
import java.nio.CharBuffer; | |
import java.nio.channels.SelectionKey; | |
import java.nio.channels.Selector; | |
import java.nio.channels.ServerSocketChannel; | |
import java.nio.channels.SocketChannel; | |
import java.nio.charset.Charset; | |
import java.nio.charset.CharsetEncoder; |
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
# bash | |
# zsh |
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
# From Wizard | |
Admin | |
cron | |
Archive | |
p7zip | |
rsnapshot | |
zip | |
Devel | |
git |
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
brew install coreutils | |
brew install findutils | |
brew install wget | |
brew install netcat --verbose | |
brew install ssh-copy-id |
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
import org.apache.commons.cli.*; | |
/** TODO: which maven artifact version do we need? */ | |
public class CommandLineOptionsExample { | |
public static void main(String[] args) { | |
String port; | |
_parseOptions: { | |
Options options = new Options() |
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
test -e "$1" || echo "[DEBUG] Does not exist: $1" | |
# Do we ever need if-else syntax? Probably not but here it is anyway: | |
if [ -e "$1" ] | |
then | |
echo "ok" | |
else | |
echo "nok" | |
fi |
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
sudo apt-get install -y zsh | |
chsh $(whoami) -s /usr/bin/zsh | |
sudo apt-get install -y git | |
sudo apt-get remove -y vim | |
sudo apt-get install -y vim | |
sudo apt-get install -y openjdk-7-jdk | |
#sudo apt-get install -y default-jdk |
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
import java.net.URI; | |
import java.net.URISyntaxException; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.Response; | |
import org.glassfish.jersey.jdkhttp.JdkHttpServerFactory; | |
import org.glassfish.jersey.server.ResourceConfig; |
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
## default value | |
URL=${1:-"https://www.amazon.com/War-That-Made-America-French/dp/B000E1MXZ0"} | |
## Error message and exit with non zero status | |
${1:?"You didn't pass a value, exiting"} | |
## No need for this (even Bourne Shell has shorthands) | |
if [ -n "$1" ]; | |
then |
OlderNewer