Skip to content

Instantly share code, notes, and snippets.

View survivant's full-sized avatar

Sebastien Dionne survivant

  • Jerabi inc.
  • Montreal, Quebec
View GitHub Profile
@survivant
survivant / Socketio-Websocket-close
Created December 6, 2011 18:31
Socketio-Websocket usecase
import static org.testng.Assert.assertEquals;
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import com.ning.http.client.AsyncHandler;
import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.AsyncHttpClientConfig;
import com.ning.http.client.HttpResponseBodyPart;
import com.ning.http.client.Response;
@survivant
survivant / AtmosphereConfigv2.java
Created December 7, 2011 16:22
exemple de AtmosphereConfig
/**
* Load AtmosphereHandler defined under META-INF/atmosphere.xml
*
* @param stream The input stream we read from.
* @param c The classloader
*/
protected void loadAtmosphereDotXml(InputStream stream, URLClassLoader c)
throws IOException, ServletException {
if (stream == null) {
@survivant
survivant / socketio-chat.html
Created January 17, 2012 03:18
Socket.io chat proposal
<!DOCTYPE html>
<html>
<head>
<link href="css/style.css" rel="stylesheet">
<script src="./dist/jquery-1.7.js"></script>
<script src="./dist/socket.io.js"></script>
<script>
// socket.io specific code
var socket = io.connect('', {'resource':'atmosphere-socketio-chat/ChatAtmosphereHandler'});
@survivant
survivant / Main.java
Created April 2, 2012 17:58
Jackson-xml Empty field example
package com.test.stack;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Main {
@JsonProperty("com.test.stack")
public Stack stack;
}
@survivant
survivant / Main.java
Created April 2, 2012 18:07
Jacskson-xml deserialize List problem
package com.test.options;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Main {
@JsonProperty("com.test.options")
public Options options;
}
@survivant
survivant / Main.java
Created April 10, 2012 12:42
Unrecognized field ""
package com.test.stack;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Main {
@JsonProperty("com.test.stack")
public Stack stack;
}
@survivant
survivant / make.sh
Created February 11, 2017 00:29 — forked from artzub/make.sh
Install JetBrains Hub + YouTrack + UpSource + Nginx
#!/bin/bash
apt-get install mc htop git unzip wget curl -y
echo
echo "====================================================="
echo " WELCOME"
echo "====================================================="
echo
echo "Hub"
@survivant
survivant / README.md
Created March 4, 2020 01:46 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@survivant
survivant / CKAD.md
Created May 8, 2020 01:55 — forked from veggiemonk/CKAD.md
CKAD exam preparation
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution: