Skip to content

Instantly share code, notes, and snippets.

@senritsu
senritsu / SketchSystems.spec
Created February 13, 2021 15:03
Simple Deckbuilder
Simple Deckbuilder
# set up decks, etc.
Preparation*
done -> Turn
Turn
# user is able to to something here
Idle*
play card -> Executing action
end turn -> End of turn
# mostly animation and context changes
namespace MassTransitTestService
{
using System;
using System.Threading.Tasks;
using AlgorithmicMapsContracts.MassTransitTest;
using MassTransit.JobService;
using Microsoft.Extensions.Logging;
public class ConvertVideoConsumer : IJobConsumer<ConvertVideoCommand>
{
@senritsu
senritsu / SketchSystems.spec
Created October 21, 2018 17:17
Three Hero Deckbuilder
Three Hero Deckbuilder
Cleanup*
draw card for hero without card -> Cleanup
all heroes have one card -> Action
Action
draw enemy -> Assign
draw second attack -> Combat
Assign
select player -> Action
Combat
export default {
template: '<div>Hello {{ name }} from remote component</div>',
props: {name: String},
created () { this.interval = setInterval(() => console.log(`tick from remote ${this.name}`), 1000) },
beforeDestroy () { clearInterval(this.interval) }
}
using UnityEngine;
using UnityEditor;
using System.Collections;
using UnityEditor.Callbacks;
public class GizmoIconUtility
{
[DidReloadScripts]
static GizmoIconUtility()
{
@senritsu
senritsu / keyfall_watcher.js
Created September 15, 2016 06:35
Tampermonkey userscript to watch for Keyfalls in the invisible sun Kickstarter campaign
// ==UserScript==
// @name Invisible sun keyfall watcher
// @namespace http://tampermonkey.net/
// @version 0.1
// @description watches for keyfalls
// @author senritsu
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser-polyfill.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.6.15/browser.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js
// @match https://www.kickstarter.com/projects/montecookgames/invisible-sun*
$sarcoline: #fadfae;
$coquelicot: #ec4908;
$smaragdine: #009874;
$mikado: #ffc40c;
$glaucous: #6082b6;
$wenge: #645452;
$fulvous: #e48400;
$xanadu: #738678;
$falu: #801818;
$eburnean: #f5f0e6;
@senritsu
senritsu / CombinedTests.cshtml
Created January 21, 2016 09:09
Razor lambda ArgumentOutOfRangeException issue
@using RazorLambdaBugTest.Code
@{
// CONSTRUCTORS
// error
var testInstance1 = new TestClassWithCtor<TestClassWithProperties>
(
x => x.Foo,
x => x.Bar,
x => x.Baz
@senritsu
senritsu / static_vs_bound.coffee
Last active August 29, 2015 14:21
difference between static and bound class variables
class Test
staticVar = 0
boundVar: 0
# @::boundVar = 0
# this::boundVar = 0
increment: ->
staticVar += 1
@boundVar += 1
read: -> "static: #{staticVar}, bound: #{@boundVar}"
@senritsu
senritsu / javascript_resources.md
Last active August 29, 2015 14:06 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage