Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View MikeBild's full-sized avatar
🏠
Working from home

Mike Bild MikeBild

🏠
Working from home
View GitHub Profile
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@MikeBild
MikeBild / mob_res
Last active August 29, 2015 13:59
Mobile Resolutions
Icons
Android
small (ldpi): 36 x 36
medium (mdpi): 48 x 48
large (hdpi): 72 x 72
xlarge (xhdpi): 96 x 96
xxlarge (xhdpi): 144 x 144
App-Store: 512 x 512
iOS
eventsource
.fromStreams(['os'], 'statistics')
.run({
$init: function(state){
state.count = 0;
return state;
},
$completed: function(state){
return state;
},
@MikeBild
MikeBild / tryGetWithPromise.js
Last active August 29, 2015 14:08
AngularJS tryGet(url)
<!doctype html>
<html data-ng-app="myApp">
<head>
<meta charset="utf-8">
<title>Try Get</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.0-beta.13/angular.min.js"></script>
</head>
<body data-ng-controller="demoCtrl">
<script>
@MikeBild
MikeBild / gist:031e88dd5af0d5c9f9b2
Created January 8, 2015 08:54
Mocha integration tests example
'use strict';
var assert = require('assert'),
restify = require('restify');
var client = restify.createJsonClient({
version: '*',
rejectUnauthorized: false,
url: 'https://127.0.0.1:8080',
headers: {'x-auth-token':'66LOHAiB8Zeod1bAeLYW'}
/*
# jquery.couch.longpoll.js #
A handler that can be used to listen to changes from a CouchDB database,
using long-polling.
This seemed to be a bit simpler than using continuous polling, which I
was unable to get working with jQuery.
public class DisplayNameByResourceKeyAttribute : DisplayNameAttribute
{
public DisplayNameByResourceKeyAttribute(string resourceKey)
{
DisplayNameValue = DisplayNameByResourceKey(resourceKey) ?? resourceKey;
}
private static string DisplayNameByResourceKey(string value)
{
return null;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace ConsoleApplication3
{
class Program2
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
namespace ConsoleApplication4
{
class Program
{
@MikeBild
MikeBild / CodeKataPickAkin.cs
Created May 1, 2011 20:24
Code Kata PickAkin
/*
http://ilker.de/code-kata-pickakin
akinList = [A1,B2,A2,A3,B3,A4,D1,D2,B1]
ceoList = [C1,E1,E2]
controlList = [F1]
*/
var ceoListOriginal = new List<string>() {"A1", "B1", "A2", "A3", "C1", "D1", "E1", "E2"};