Skip to content

Instantly share code, notes, and snippets.

View arxae's full-sized avatar

Andy Maesen arxae

View GitHub Profile
@arxae
arxae / gist:8baa5e4d49416f643703bbb195591210
Created March 28, 2017 21:33
Simple roguelike map drawing in c# console
using System;
using System.Collections.Generic;
namespace rlike
{
class Program
{
static Random Rng;
static void Main(string[] args)
@arxae
arxae / SkipWhenPreviousJobIsRunningAttribute.cs
Created January 10, 2019 00:17
Apply to class that executes a job in Hangfire. If a recurring job with this attribute is already running, a new one won't start
using System;
using System.Collections.Generic;
using Hangfire.Client;
using Hangfire.Common;
using Hangfire.States;
using Hangfire.Storage;
/// <summary>
/// Makes sure that 2 (or more) same jobs will not be run twice at the same time.
This file has been truncated, but you can view the full file.
{
"missionRewards": {
"Mercury": {
"Apollodorus": {
"gameMode": "Survival",
"isEvent": false,
"rewards": {
"A": [
{
"_id": "fc25008a1520110a9534065e0d1e3765",
@arxae
arxae / cl.js
Created June 13, 2021 22:42
console.log stuff
export function getConsole(name: string, color: string) {
const newConsole : Console = Object.create(console);
newConsole.log = console.log.bind(console, `%c[${name}]`, `color: ${color}`);
newConsole.warn = console.warn.bind(console, `[${name}]`);
newConsole.error = console.error.bind(console, `[${name}]`);
newConsole.time = (label?: string) => console.time(`[${name}] ${label}`);
newConsole.timeEnd = (label?: string) => console.timeEnd(`[${name}] ${label}`);
return newConsole;
}