Skip to content

Instantly share code, notes, and snippets.

View kameko's full-sized avatar
⚙️
let go = future.await;

カメ子 kameko

⚙️
let go = future.await;
  • Caesura Software Solutions
  • United States of America
View GitHub Profile
@kameko
kameko / ExceptionListener.cs
Created April 30, 2021 23:11
ExceptionListener
namespace Your.Namespace.Here
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
public static class ExceptionListenerExtensions
@kameko
kameko / io.js
Created November 15, 2018 14:22
IO (so far)
"use strict";
Caesura.System.IO = function (args) {
args = args || {};
let hidden = Caesura.System.class(args, "Caesura.System.IO");
let reveal = hidden.reveal;
reveal.outputMethod = undefined;
reveal.defaultHTMLoutputElementId = args.defaultHTMLoutputElementId || "CaesuraIO";
@kameko
kameko / collections.js
Last active November 13, 2018 02:11
collections.js (so far)
Caesura.System.Collections = {};
Caesura.System.Collections.List = function (args) {
var self = Caesura.System.class(args, "Caesura.System.Collections.List");
var public = self.public;
self.addArgs = function (col) {
var newcol = [];
if (col === undefined || col.collection === undefined) {
@kameko
kameko / OOP2.js
Last active November 12, 2018 01:29
more OOP
var Project = {};
var newclass = function (args) {
args.public = {};
args.extends = function (classname) {
args.public = classname(args);
args.base = Object.assign({}, args);
return args;
};
@kameko
kameko / OOP.js
Last active November 11, 2018 23:59
Good way to do OOP in JS
var MyProject = {};
var newobj = function (args) {
return {
public: {},
private: args || {}
};
};
var extendsfrom = function (classname, args) {
using System;
class MainClass
{
public static void Main (string[] args)
{
var p = new Program();
p.Run();
}
}
@kameko
kameko / GenericNumbers.cs
Created May 15, 2018 05:25
A few static generic methods to work on number types
using System;
namespace Numbers
{
public static class GenericNumbers
{
[Flags]
public enum NumberTypes
{
@kameko
kameko / Division.cs
Last active April 5, 2018 08:05
Non-throwing Division extention methods because I'm super paranoid of Division by Zero.
using System;
namespace Caesura.Additions
{
using System.Runtime.CompilerServices;
using Caesura.Additions.Contracts;
public static class Division
{