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
| kubeadm init --use-kubernetes-version=v1.5.6 |
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
| import java.net.InetSocketAddress; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Date; | |
| import java.util.concurrent.Executors; | |
| import java.util.concurrent.ScheduledThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; |
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
| package example; | |
| import io.netty.channel.ChannelHandler; | |
| import io.netty.channel.ChannelInitializer; | |
| import io.netty.channel.socket.SocketChannel; | |
| import io.netty.handler.codec.LengthFieldBasedFrameDecoder; | |
| import io.netty.handler.codec.LengthFieldPrepender; | |
| import io.netty.handler.codec.string.StringDecoder; | |
| import io.netty.handler.codec.string.StringEncoder; | |
| import io.netty.util.CharsetUtil; |
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
| import scala.xml._ | |
| import scala.collection.mutable.{Map, HashMap} | |
| /** | |
| * The XML2JSON object will transform the XML data in scala.xml.Node to | |
| * the string in JSON format. | |
| */ | |
| object XML2JSON { | |
| sealed trait JSONObject |
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
| import scala.xml._ | |
| import scala.util.parsing.json.JSON | |
| /** | |
| * The XML2JSON object will transform a string in json format to | |
| * a NodeSeq object. | |
| */ | |
| object JSON2XML { | |
| def apply(input:String):NodeSeq = { |
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
| /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
| import com.jcraft.jsch.*; | |
| import java.awt.*; | |
| import javax.swing.*; | |
| import java.net.*; | |
| public class StreamForwarding{ | |
| public static void main(String[] arg){ | |
| int port; |
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
| /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
| import com.jcraft.jsch.*; | |
| import java.awt.*; | |
| import javax.swing.*; | |
| import java.io.*; | |
| import java.util.zip.GZIPInputStream; | |
| public class Shell{ | |
| public static void main(String[] arg){ |
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
| // The following code is from http://www.academicpub.org/PaperInfo.aspx?PaperID=14496 . | |
| import java.math.BigInteger; | |
| import java.security.*; | |
| import java.security.spec.*; | |
| import javax.crypto.KeyAgreement; | |
| public class ECCKeyAgreement { | |
| public static void main(String[] args) throws Exception { | |
| KeyPairGenerator kpg; | |
| kpg = KeyPairGenerator.getInstance("EC","SunEC"); |
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
| /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ | |
| /** | |
| * This program will demonstrate how to use "aes128-cbc". | |
| * | |
| */ | |
| import com.jcraft.jsch.*; | |
| import java.awt.*; | |
| import javax.swing.*; | |
| public class AES{ |