Skip to content

Instantly share code, notes, and snippets.

View digitalasia's full-sized avatar

digitalasia digitalasia

View GitHub Profile
@digitalasia
digitalasia / pointing_arrow
Created October 12, 2013 11:56
A simple pointing arrow that slides left to right.
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<style>
#triangle-right {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-left: 50px solid red;
border-bottom: 30px solid transparent;
@digitalasia
digitalasia / gist:8372096
Created January 11, 2014 15:14
method to call the rabbitmq server
-(IBAction) login
{
//publish something
AMQPConnection *connection = [[AMQPConnection alloc] init];
[connection connectToHost:@"pmimitest.cloudapp.net" onPort:5672];
[connection loginAsUser:@"guest" withPassword:@"guest" onVHost:@"/"];
AMQPChannel *channel = [connection openChannel];
//=================================================================================
@digitalasia
digitalasia / gist:8382935
Created January 12, 2014 10:16
server.log of the rabbitmq client.
DEBUG:pika.callback:0 registered uses left
DEBUG:pika.callback:Removing callback #0: {'callback': <bound method BlockingConnection._on_connection_closed of <pika.adapters.blocking_connection.BlockingConnection object at 0x1754550>>, 'only': None, 'one_shot': True, 'arguments': None, 'calls': 0}
DEBUG:pika.callback:Calling <bound method BlockingConnection._on_connection_closed of <pika.adapters.blocking_connection.BlockingConnection object at 0x1754550>> for "0:Connection.CloseOk"
WARNING:pika.adapters.base_connection:Unknown state on disconnect: 0
DEBUG:pika.callback:Added: {'callback': <bound method BlockingConnection._on_connection_start of <pika.adapters.blocking_connection.BlockingConnection object at 0x1754550>>, 'only': None, 'one_shot': True, 'arguments': None, 'calls': 1}
WARNING:pika.adapters.base_connection:Unknown state on disconnect: 0
DEBUG:pika.callback:Incremented callback reference counter: {'callback': <bound method BlockingConnection._on_connection_start of <pika.adapters.blocking_connection
@digitalasia
digitalasia / gist:8382945
Created January 12, 2014 10:18
this is a snippet of the full server.log https://gist.github.com/digitalasia/8382935
1a) FROM RUBY AMQP CLIENT
=====================
DEBUG:pika.channel:Called with <METHOD(['frame_type=1', 'channel_number=1', "method=<Basic.Deliver(['consumer_tag=ctag1.0', 'redelivered=False', 'routing_key=serverv3', 'delivery_tag=43', 'exchange=ToServerv3'])>"])>, <Header(['frame_type=2', 'channel_number=1', "properties=<BasicProperties(['delivery_mode=2', 'priority=0', 'content_type=application/octet-stream'])>", 'body_size=243'])>, '{\n "method": "login",\n "identity": {\n "name": "ytbryan",\n "password": "hahaha",\n "email": "ytbryanbunny@gmail.com",\n "device_id": "",\n "acct_status": ""\n },\n "contacts": [\n {\n "email": "ytbryan@gmail.com"\n }\n ]\n}'
INFO:root:Fri Jan 10 13:59:04 2014: [x] 'serverv3':'{\n "method": "login",\n "identity": {\n "name": "ytbryan",\n "password": "hahaha",\n "email": "ytbryanbunny@gmail.com",\n "device_id": "",\n "acct_status": ""\n },\n "contacts": [\n {\n "email": "ytbryan@gmail.com"\n }\n ]\n}'
1b) FROM IOS
@digitalasia
digitalasia / gist:8415949
Created January 14, 2014 09:57
iads and admobs
#pragma mark iADs and Admob
-(void) addAdMob
{
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
// Specify the ad's "unit identifier". This is your AdMob Publisher ID.
bannerView_.adUnitID = @"";
// Let the runtime know which UIViewController to restore after taking

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert