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 | |
### your registry must have the following environment var set | |
# REGISTRY_STORAGE_DELETE_ENABLED=true | |
### replace YOUR_SERVER with corect info | |
REGISTRY_URL=https://YOUR_SERVER:5000 | |
### host registry volume folder | |
REGISTRY_ROOT=/registry | |
### container to execute garbage-collect | |
CONTAINER_NAME=services_registry.1 |
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
// SessionObj ensures that reload,save and destroy are functions, any other key is fair game | |
export interface SessionObj { | |
reload: () => Promise<any>, | |
save: () => Promise<any>, | |
destroy: () => Promise<any>, | |
[key: string]: any | |
} | |
// add our session member to SocketIO.Socket |
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
FROM webdevops/php-apache-dev:7.2 | |
# add microsoft packages to apt sources | |
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - | |
RUN curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list | |
# install needed system packages as well as a few nice to have utils | |
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | |
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \ | |
ACCEPT_EULA=Y apt-get -y install msodbcsql17 unixodbc-dev less joe iputils-ping traceroute telnet && \ | |
apt-get purge -y --auto-remove && \ |
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
class Vector { | |
constructor(public x: number, | |
public y: number, | |
public z: number) { | |
} | |
static times(k: number, v: Vector) { return new Vector(k * v.x, k * v.y, k * v.z); } | |
static minus(v1: Vector, v2: Vector) { return new Vector(v1.x - v2.x, v1.y - v2.y, v1.z - v2.z); } | |
static plus(v1: Vector, v2: Vector) { return new Vector(v1.x + v2.x, v1.y + v2.y, v1.z + v2.z); } | |
static dot(v1: Vector, v2: Vector) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; } |
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 { Injectable, ModuleWithProviders, NgModule, Optional } from '@angular/core'; | |
import { | |
HTTP_INTERCEPTORS, | |
HttpEvent, | |
HttpHandler, | |
HttpInterceptor, | |
HttpRequest | |
} from '@angular/common/http'; | |
import { |
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 functools | |
import types | |
# if passed as 1st argument to decorator will be used for setup and teardown | |
from typing import Optional, Generator, Dict, Callable, Union | |
# first call by next will setup. 2nd call will teardown. | |
def setup(): | |
print("setup") |
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; | |
using System.Linq; | |
namespace Websocket | |
{ | |
public interface IWsMessageFilterPredicate | |
{ | |
bool Evaluate(IWsMessage msg); | |
} |
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; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using NativeWebSocket; | |
using PAR; | |
using Sirenix.OdinInspector; | |
using Sirenix.Utilities; |
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/env python | |
from textual.app import App, ComposeResult | |
from textual.widgets import Header, Footer, Log, Label, ListView, ListItem | |
from textual.containers import Horizontal | |
class ListApp(App[None]): | |
def compose(self) -> ComposeResult: | |
yield Header(show_clock=True) | |
with Footer(): |
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
"""Theme manager for Textual""" | |
import os | |
from typing import Dict, List, Literal, Optional, TypeAlias | |
import simplejson as json | |
from textual.design import ColorSystem | |
ThemeMode: TypeAlias = Literal["dark", "light"] | |
ThemeModes: List[ThemeMode] = ["dark", "light"] |
OlderNewer