Skip to content

Instantly share code, notes, and snippets.

-- co-routines in pico8 seem a bit "broken" ?
-- coresume only passes through the extra arguments once, which seems to fit the lua spec and I can live with that
-- but yield return values seem to be ignored? it only ever returns true/false and an error message if it failed?
-- the below code never displays any return values until the coroutine function stops yielding and hits the final return
left=0 right=1 up=2 down=3 fire1=4 fire2=5
function _init()
counter = 0
fn = cocreate(stuff)
class Program
{
public class TimeTargetCategory
{
public Guid Id { get; set; }
public Guid TimeTargetId { get; set; }
public Guid CategoryId { get; set; }
public decimal? MondayTarget { get; set; }
public decimal? TuesdayTarget { get; set; }
public decimal? WednesdayTarget { get; set; }
@grumpydev
grumpydev / BinaryProcessor.cs
Last active December 21, 2017 12:53
Sample processor for binary files, either from a byte array, or from a stream
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Nancy;
using Nancy.Responses;
using Nancy.Responses.Negotiation;
namespace ByteArrayDemo
{
@grumpydev
grumpydev / install-rc4.sh
Created February 24, 2017 22:26
Install dotnet rc4 on unbuntu 16.10
#!/bin/bash
# Remove old version first using:
# sudo apt-get remove dotnet-dev-1.0.0-preview2.1-003177
# sudo apt autoremove
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update
@grumpydev
grumpydev / install-rc4.sh
Created February 24, 2017 22:26
Install dotnet rc4 on unbuntu 16.10
#!/bin/bash
# Remove old version first using:
# sudo apt-get remove dotnet-dev-1.0.0-preview2.1-003177
# sudo apt autoremove
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update
@grumpydev
grumpydev / install-rc4.sh
Created February 24, 2017 22:26
Install dotnet rc4 on unbuntu 16.10
#!/bin/bash
# Remove old version first using:
# sudo apt-get remove dotnet-dev-1.0.0-preview2.1-003177
# sudo apt autoremove
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update
@grumpydev
grumpydev / Dumbo.cs
Created January 24, 2017 13:10
For funsies, lowest common denominator nancy bootstrapper with no container at all
using System;
using System.Collections.Generic;
using System.Globalization;
using Nancy;
using Nancy.Bootstrapper;
using Nancy.Conventions;
using Nancy.Culture;
using Nancy.Diagnostics;
using Nancy.ErrorHandling;
using Nancy.Hosting.Aspnet;

Keybase proof

I hereby claim:

  • I am Grumpydev on github.
  • I am grumpydev (https://keybase.io/grumpydev) on keybase.
  • I have a public key whose fingerprint is 4D91 458F 5D62 4D20 E528 222E 3EC9 B2CF 76BF B307

To claim this, I am signing this object:

#region Here Be Dragons..
// ___====-_ _-====___
// __--^^^ // \\ ^^^--_
// _-^ // ( ) \\ ^-_
// - // |\^^/| \\ -
// _/ // (0::0) \\ \_
// / (( \\// )) \
// - \\ (oo) // -
// - \\ / \/ \ // -
// - \\/ \// -
SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
echo succeeded
chmod 600 "$SSH_ENV"
. "$SSH_ENV" > /dev/null