Skip to content

Instantly share code, notes, and snippets.

View jkells's full-sized avatar
🐤
Paddling

Jared Kells jkells

🐤
Paddling
  • Wollongong, Australia
View GitHub Profile
@jkells
jkells / Saga.cs
Last active March 20, 2017 06:57
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading.Tasks;
namespace ConsoleApp1
{
/// <summary>
/// An example of a redux-saga style async runner in C#
/// </summary>

Keybase proof

I hereby claim:

  • I am jkells on github.
  • I am jkells (https://keybase.io/jkells) on keybase.
  • I have a public key whose fingerprint is E551 3215 5758 85DC E9DD DB89 EC8F 6F62 01E5 0016

To claim this, I am signing this object:

namespace AsyncWinForms
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
@jkells
jkells / Expression.cs
Created November 11, 2010 12:21
Using an expression to determine the name of a parameter.
using System;
using System.Linq.Expressions;
namespace ConsoleApplication1
{
public static class Assert
{
public static T NotNull<T>(Expression<Func<T>> expression) where T : class
{
if (expression.Body == null || expression.Body.NodeType != ExpressionType.MemberAccess)
I would like to make a complaint in relation to 'Cap' plans offered by the major Australian mobile phone companies. I believe that 'Cap' plans are designed to confuse consumers and fall under the definition of Misleading or deceptive conduct under the TRADE PRACTICES ACT 1974 - SECT 52.
Essentially my complaint revolves around the deceptive way the phone companies skew the meaning of Australian currency.
For example a phone company charges $59 dollars per month for a mobile service that provides $350 worth of calls. The $350 has no correlation to the actual value 350 Australian Dollars yet the value of the service measured and advertised in Australian dollars.
Paying for a mobile phone service consists of exchanging Australian dollars for minutes spent on the phone and megabytes of data. In other countries mobile service is sold in a natural easy to understand way. Dollars for minutes. The Australian phone companies have introduced an extra layer between what you pay and what you receive consisting of an a
require 'curb'
require 'nokogiri'
class Scrape < ActiveRecord::Base
belongs_to :push_definition
#Class method to scrape a push_definition.
def self.scrape push_definition
curl = Curl::Easy.new
curl.follow_location = true
curl.max_redirects = 5
#include <stdio.h>
#include "sample.h"
#include "ail/view.h"
#include "ail/label.h"
using namespace std;
Application* ailGetApplication(){
return new AppSample();
}
-(id) initWithVect: (int16_t) dx: (int16_t) dy: (uint8_t) btn{
self = [super init];
[self AddByte: 6];
[self AddINT16: dx * 2];
[self AddINT16: dy * 2];
[self AddByte: btn];
return self;
}
@jkells
jkells / gist:227752
Created November 6, 2009 05:35
Example of a simple php script to tell an iphone app which add network to use dynamically.
<?php
$app = $_GET['APP'];
$version = $_GET['VERSION'];
// Map each application / version to a chance table
$appTbl = array(
"REMOTEKITTENFREE"=>array(
"1.1" => array(
array(0.1, "MOBCLIX"),
array(0.9, "ADMOB")