This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Simple service manager. Allows global access to a single instance of any class. | |
| /// Copyright (c) 2014-2017 Eliot Lash | |
| /// </summary> | |
| public class Services | |
| { | |
| //Statics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/realm/realm-js/issues/370#issuecomment-270849466 | |
| export default class Realm { | |
| constructor(params) { | |
| this.schema = {}; | |
| this.callbackList = []; | |
| this.data = {}; | |
| this.schemaCallbackList = {}; | |
| params.schema.forEach((schema) => { | |
| this.data[schema.name] = {}; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import os, sys, zipfile, tempfile | |
| # wadls (pronounced "waddles", thx joshthenesnerd) - list all maps in a wad/zip/pk3 | |
| # requires omgifol module, set path to it here or in env variable | |
| OMG_PATH = os.environ.get('OMG_PATH', None) or '/home/jpl/projects/wadsmoosh' | |
| sys.path.append(OMG_PATH) | |
| import omg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections; | |
| using UniRx; | |
| using UnityEngine; | |
| using System.Threading; | |
| namespace UniRx { | |
| public static partial class CustomObservable { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { v4 as uuid } from 'uuid'; | |
| export function generateId() { | |
| return uuid(); | |
| } | |
| const v4 = new RegExp(/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i); | |
| console.log(generateId().match(v4)); | |
| //console.log(generateId().length) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -eu | |
| # Quote a single- or multi-line string for use in git's aliases | |
| # Copyright (c) 2016 Tom Hale under https://en.wikipedia.org/wiki/MIT_License | |
| quote() { | |
| printf %s "$1" | sed -r 's/(["\\])/\\\1/g'; | |
| } | |
| IFS=$(printf '\n') |