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 / 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:

@grumpydev
grumpydev / gist:308ee779e04ecfabc606
Created May 13, 2015 17:10
Adding a new data disk to an azure VM
Get-AzureVM "serviceName" -Name "vmName" | Add-AzureDataDisk -CreateNew -DiskSizeInGB 128 -DiskLabel "Data" -LUN 0 -MediaLocation "https://mybloglocation.blob.core.windows.net/vhds/vmName-data.vhd" | Update-AzureVM
public LoggerConfiguration BuildLogger(
LoggerConfiguration logConfiguration,
LogEventLevel logLevel,
string nodeName,
string roleName)
{
var path = this.SanitisePath(this.GetPath(logLevel, nodeName, roleName, this._configuration));
var configuration = logConfiguration.WriteTo.Seq(this._serverUrl, logLevel, bufferBaseFilename: path, period: TimeSpan.FromMinutes(1));
@grumpydev
grumpydev / ResponseExtensions.cs
Created March 24, 2015 09:45
Extension method for Nancy.Response to get the contents as a string
namespace Nancy.Extensions
{
using System.IO;
using System.Text;
public static class ResponseExtensions
{
public static string ToString(this Response response, Encoding encoding = null)
{
var actualEncoding = encoding ?? Encoding.UTF8;