Skip to content

Instantly share code, notes, and snippets.

@ayoung
ayoung / SaambaaiPhone_2011-04-27-113852_Andrews-Phone.crash
Created April 28, 2011 20:54
Crash Logs for Saambaa using MonoTouch 4
Incident Identifier: 88EB71F8-C273-4F58-A918-4796C0ADA78E
CrashReporter Key: 21ceacf832119578d926fda2f091e5e51e24c729
Hardware Model: iPhone3,1
Process: SaambaaiPhone [5500]
Path: /var/mobile/Applications/995F2804-81DC-411D-A296-5D87A8353785/Saambaa.iPhone.app/SaambaaiPhone
Identifier: SaambaaiPhone
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@ayoung
ayoung / RecipientBubble.cs
Created July 2, 2011 07:57
How to create iOS's recipient bubbles in MonoTouch
using System;
using System.Drawing;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using System.IO;
namespace BubbleExample
{
public class RecipientBubble : UIView
{
@ayoung
ayoung / client.js
Created December 20, 2011 20:08
closure problem
var rest = require('restler');
function Client(baseUrl) {
if (this instanceof Client) {
this.baseUrl = baseUrl;
}
else {
return new Client(baseUrl);
}
};
@ayoung
ayoung / ApiErrors.js
Created March 10, 2012 08:06
Api Errors
var errorTypes = new Hasshu({
'internal_error': 'An internal error occured',
'some_validation_error': 'Something didn\'t validate'
});
errorTypes.forEach(function(code, message) {
var errorType = // use mapper on key
@ayoung
ayoung / guide.html
Created July 6, 2012 17:52
program guide sample
<!-- this div should have the inset shadow. overflow hidden -->
<div id="outer-container">
<!-- this div should have a static height but a very large width to fit the
generated program items -->
<div id="container">
<!-- inside here is where all the program items go -->
</div>
@ayoung
ayoung / gist:4128456
Created November 21, 2012 23:12
ServiceStack init bug
[SetUpFixture]
public class SetupFixture
{
private AppHost _appHost;
private static bool _hasInitted;
[SetUp]
public void StartWebApi()
{
if (_appHost == null)
@ayoung
ayoung / buzz.js
Created February 20, 2013 07:06
FizzBuzz
for (var i = 0; i <= 100; i++) {
if((i % 3) === 0 && (i % 5) === 0) {
console.log(i + ": fizzbuzz");
}
else if((i % 3) === 0) {
console.log(i + ": fizz");
}
else if((i % 5) === 0) {
{
"created": 1425714928,
"id": "evt_15dcmS2qY5VcKUuIgwl2qU61",
"api_version": "2015-02-18",
"request": "iar_5pHLdcZRvm0HuE",
"pending_webhooks": 1,
"data": {
"object": {
"id": "in_15dcmS2qY5VcKUuIudpdptFq",
"forgiven": false,