Skip to content

Instantly share code, notes, and snippets.

@des-virus
des-virus / WsChatServlet.java
Created February 23, 2018 10:32 — forked from chitan/WsChatServlet.java
How to use WebSocket of Tomcat
//This sample is how to use websocket of Tomcat.
package wsapp;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.ArrayList;
import org.apache.catalina.websocket.MessageInbound;
import org.apache.catalina.websocket.StreamInbound;
import org.apache.catalina.websocket.WebSocketServlet;
@des-virus
des-virus / database.sql
Created November 6, 2017 04:34
Database SQL
--
-- Cấu trúc bảng cho bảng `category`
--
CREATE TABLE `category` (
`id` int(11) NOT NULL,
`name` text COLLATE utf8_unicode_ci NOT NULL,
`note` text COLLATE utf8_unicode_ci NOT NULL,
`is_deleted` tinyint(1) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
@des-virus
des-virus / dynamic-gist-embed.html
Created October 14, 2017 04:24
Dynamic Gist Embedding
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Dynamic Gist Embedding</title>
</head>
<body>
<p>
@des-virus
des-virus / CDN
Created October 14, 2017 03:34
CDN HTML
<!-- Google jQuery CDN -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css">
<!-- Font awesome-->
@des-virus
des-virus / gggg
Created October 14, 2017 03:26
ggg
ggggggg