Skip to content

Instantly share code, notes, and snippets.

@rpgmaker
rpgmaker / gist:4532220
Last active December 11, 2015 02:39
Sample Proxy
public class ChatServiceServer : IESBMessage<ChatRequest, ChatResponse> {
[ESBTransport(typeof(TcpTransport))]
[ESBTransportParam("Port", "2222")]
[ESBTransportParam("IPAddress", "127.0.0.1")]
public ChatResponse Handle(ChatRequest msg) {
Console.WriteLine("Received Chat Request with ID = {0}", msg.ESBCorrelationID);
var response = new ChatResponse() {
UserName = String.Format("{0}Server", msg.UserName),
Message = "Server: Hello Client"
@rpgmaker
rpgmaker / gist:4532489
Created January 14, 2013 19:13
Listener sample
[ESBProxyService]
public interface IStarbuckService {
[ESBRequest(typeof(DrinkPrepared), isRequestClass: true)]
void SendDrinkPrepared(DrinkPrepared msg);
[ESBRequest(typeof(DrinkReady), isRequestClass: true)]
void SendDrinkReady(DrinkReady msg);
[ESBRequest(typeof(DrinkPayment), isRequestClass: true)]
@rpgmaker
rpgmaker / gist:5069744
Last active December 14, 2015 10:09
win
_ = ((!+[]+!+[]+(!+[]+!+[])+!+[])*!+[]+!+[]+(!+[]+!+[])+!+[])*((!+[]+!+[]+(!+[]+!+[])+!+[])*!+[]+!+[]+(!+[]+!+[])+!+[])+((!+[]+!+[]+(!+[]+!+[])+!+[])*!+[]+!+[]+(!+[]+!+[])+!+[])+((!+[]+!+[]+(!+[]+!+[])+!+[])*!+[]+!+[]+(!+[]+!+[])+!+[])+(!+[])
console.log(String.fromCharCode(_+(!+[]+!+[]+(!+[]+!+[])+!+[])+(!+[]+!+[]+(!+[]+!+![]))+(!+[])+((!+[]+!+[]+(!+[]+!+[])+!+[])+(!+[]+!+[]+(!+[]+!+![])))) +
String.fromCharCode(_+(!+[]+!+[]+(!+[]+!+[])+!+[])) + String.fromCharCode(_+(!+[]+!+[]+(!+[]+!+[])+!+[])+(!+[]+!+[]+(!+[]+!+![]))+(!+[])))
@rpgmaker
rpgmaker / gist:5385103
Last active December 16, 2015 05:29
Razor JS
<script type='text/javascript'>
var Html = (function(){
var content = jQuery('<div>');
function _write(html){
content.append(html);
}
function _clear(){
@rpgmaker
rpgmaker / gist:5385338
Created April 15, 2013 02:43
Razor JS 2
<script type='text/javascript'>
var Html = (function(){
var content = jQuery('<div>');
function _write(html){
content.append(html);
}
function _clear(){
@rpgmaker
rpgmaker / gist:5385480
Created April 15, 2013 03:21
Razor JS with codeblock
<script type='text/javascript'>
var Html = (function(){
var content = jQuery('<div>');
function _write(html){
content.append(html);
}
function _clear(){
@rpgmaker
rpgmaker / gist:5385527
Created April 15, 2013 03:37
Razor Long Html
<script type='text/javascript'>
var Html = (function(){
var content = jQuery('<div>');
function _write(html){
content.append(html);
}
function _clear(){
@rpgmaker
rpgmaker / gist:5385564
Last active December 16, 2015 05:38
Razor Really Long html
<script type='text/javascript'>
var Html = (function(){
var content = jQuery('<div>');
function _write(html){
content.append(html);
}
function _clear(){
@rpgmaker
rpgmaker / gist:5392712
Created April 16, 2013 01:41
Razor JS with inline Html.Write
<span data-id='_1'></span>
<br/>
<span data-id='_2'></span>
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>-->
<script type='text/javascript'>
var Model = {},
@rpgmaker
rpgmaker / gist:5392979
Created April 16, 2013 02:49
Razor with Expression between dot
<span><span data-id='_1'></span>. <span data-id='_2'></span>.</span>
<!--<script src='http://code.jquery.com/jquery-1.9.1.min.js'></script>-->
<script type='text/javascript'>
var Model = {},
ViewResponse = function () {
return {