Skip to content

Instantly share code, notes, and snippets.

@emoa2l
emoa2l / AppHostBase
Created June 21, 2013 14:36
AutofacServiceStackAdapter
using Ctc.Business.Objects.Common;
using Ctc.Business.Raven;
using Ctc.Services.Stella2Api.Messages;
using Ctc.Services.Stella2Api.Services;
using Ctc.Services.Stella2Api.Services.Requests;
using Ctc.Services.Stella2Api.Services.RequestValidators;
using Ctc.Services.Stella2Api.Services.Responses;
using CTC.Toolbox;
using NHibernate;
using NServiceBus;
@emoa2l
emoa2l / gist:1211199
Created September 12, 2011 13:02
vb extension methods to serialize and deserialize datacontracts from restful web service
Imports System.Runtime.Serialization
Imports System.Xml
Imports System.IO
Public Module WebClient
<System.Runtime.CompilerServices.Extension()>
Public Sub AsyncDeSerializeObjectFromService(Of T)(
ByVal self As Net.WebClient,
ByVal svcUri As Uri,
@emoa2l
emoa2l / Activity1.java
Created June 5, 2011 03:40
Android async JSONClient
public class Activity1 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
JSONClient client = new JSONClient(this, l);
String url = "url that will return JSON";
client.execute(url);
}
@emoa2l
emoa2l / Activity1.java
Created June 5, 2011 03:33
Android: Create a new window(activity) and pass parameters to it.
public class Activity1 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.main);
// in the calling activity define a bundle that can contain
// some number of strings
Bundle bundle = new Bundle();
@emoa2l
emoa2l / database.php
Created May 16, 2011 15:26
CakePHP dynamic database config
<?php
/**
* This is core configuration file.
*
* Use it to configure core behaviour ofCake.
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)