Skip to content

Instantly share code, notes, and snippets.

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

Mike Cann mikecann

🏠
Working from home
View GitHub Profile
@mikecann
mikecann / open-ai-keywords-results-log.json
Created August 9, 2021 01:11
OpenAI Blog Keywords Results
[
{
"title": "1,000,000 Views!!",
"prompt": "Blog Post: Normally when i post a big number like that its followed by the word \"particles\" but surprisingly this time it followed by the word \"views\". Why? Well i have (probably a few days ago now) broken my 1 million plays cherry on 4 flash games.\n\nTo be fair the majority of these have come from my latest game IcySlicy (670k and counting), but im still pretty proud of the number. Im hoping my next game will do over a million by itself, but then again it could just get two plays :P\n\nKeywords: ",
"tags": [
"icy slicy free",
"icy slicy online",
"icy slicy play",
"icy slicy puzzle",
"icy slicy puzzle game",
@mikecann
mikecann / BraventCounter.test.ts
Last active September 11, 2018 09:10
Attempt at Bravent typings, see BraventCounter.ts for what the user-code actually looks like
import { BraventCounter, Events } from "./BraventCounter";
import { AnyEvent } from "bravent";
it("updates to the correct state when commands are issued", () => {
let counter = BraventCounter.of([]);
expect(counter.state()).toBe(0);
counter = counter.dispatch({ type: "increment" });
counter = counter.dispatch({ type: "increment" });
{
commitId: {
type: String,
required: true,
index: {
global: true,
name: commitIdIndexName,
project: true
}
},
using System;
using System.Collections.Generic;
using System.Linq;
using RSG;
using UniRx;
namespace PromiseReactiveCommand
{
public interface IBasePromiseReactiveCommand
{
@mikecann
mikecann / Routes.ts
Last active February 11, 2016 03:34
import { MarkdSiteRoot } from "../../MarkdSiteRoot";
import { Signup } from "../../signup/Signup";
import { Homepage } from "../../homepage/Homepage";
import { Router, Route, Link, IndexRoute, browserHistory } from 'react-router';
import * as React from "react";
import * as ReactDOM from "react-dom";
import { FirebaseUsersService } from "../services/UsersService";
import { AggregateLogger, ConsoleLogger } from "../helpers/logging/Logging";
var logger = new AggregateLogger();
@mikecann
mikecann / Main
Last active August 29, 2015 14:09
AutoWire Notes and Thoughts
// --- AutoWire ---
// Service Locator pattern is inferior to DI, but that is what we are stuck with in Unity, so lets make our life easier
//
// Notes:
// 1) any persistent state should be a component or belong to a component (no models, services in thin air)
//
public class Enemy : AutoWire
{
[Locate]
@mikecann
mikecann / gist:98f13390b62466e161a5
Created September 3, 2014 06:16
Copy over border infos
#if UNITY_4_6
// Import extisting border
foreach(var existing in importer.spritesheet)
if(existing.name==smd.name)
smd.border = existing.border;
#endif
@mikecann
mikecann / BaseMediator.cs
Last active August 29, 2015 14:00
Typesafe Automatic Listener Removal in Strange IoC
public class BaseMediator<TView> : Mediator
{
[Inject]
public TView View { get; set; }
protected List<SignalBinding> signalBindings = new List<SignalBinding>();
override public void OnRegister()
{
}
package content.views.main;
import base.BaseView;
import content.views.common.DivView;
import content.views.foreground.ForegroundView;
import js.JQuery;
import js.Lib;
import js.Dom;
import hsl.haxe.Signaler;
import hsl.haxe.DirectSignaler;
package base;
import js.Dom;
import js.JQuery;
import robothaxe.core.IViewContainer;
/**
* ...
* @author
*/