View Dockerfile
This file contains 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 golang:1.18 | |
RUN apt update && apt install -y librsvg2-dev && apt-get clean | |
WORKDIR /go/playground | |
COPY . . | |
RUN go build |
View 01-setup-system.network.sh
This file contains 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 | |
docker network create mynet | |
useradd --system container-user | |
mkdir -p /data/prom/config/ /data/prom/data/ /data/grafana/data/ /data/meshping/redis/ | |
chown -R container-user /data/prom/config/ /data/prom/data/ /data/grafana/data/ /data/meshping/redis/ |
View fail.js
This file contains 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
for(i=0 ; i<getdata['StaticNHostTable'].length ; i++) { | |
if(index != null) { | |
if(index == i) { | |
tt.find('span.inner-dropbox').text(getdata['StaticNHostTable'][i]['HostName']); | |
MAC = (getdata['StaticNHostTable'][i]['MAC']).split(":"); | |
IP = (getdata['StaticNHostTable'][i]['IP']).split("."); | |
for(j=0; j<6; j++){ | |
tt.find('.extra_mac_address'+(j+1)).text(MAC[j]); | |
} |
View kill.sh
This file contains 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 | |
set -euo pipefail | |
server_name=$1 | |
region=${2:-"par1"} | |
function fix_scw { | |
# there is currently a bug in scw that causes failures when (re)using servernames with '-' in it | |
rm ~/.scw-cache.db || true | |
} |
View main.go
This file contains 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
package main | |
// MIT License | |
// | |
// Copyright (c) Martin Rauscher. All rights reserved. | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is |
View JwtSecurityConfig.kt
This file contains 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
package mn.max | |
import io.micronaut.context.annotation.Value | |
import io.micronaut.security.token.jwt.signature.rsa.RSASignatureConfiguration | |
import java.security.KeyFactory | |
import java.security.interfaces.RSAPublicKey | |
import java.security.spec.X509EncodedKeySpec | |
import java.util.* | |
import javax.inject.Named | |
import javax.inject.Singleton |
View fizzlefade.html
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head><title>Javascript RT</title></head> | |
<style>canvas {width: 1280px; height: 768px}</style> | |
<body> | |
<canvas id="framebuffer"></canvas> | |
<script type="text/javascript"> | |
/* Fizzlefade using a Feistel network. |
View run.sh
This file contains 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 | |
#Start a docker container with environment variables for external port and IP | |
if [ -z $1 ] | |
then | |
echo pass in starting port | |
exit 1 | |
fi | |
START_PORT=$1 |
View elixir-npp.xml
This file contains 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
<NotepadPlus> | |
<UserLang name="Elixir" ext="ex exs" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00# 01 02 03/* 04*/</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |
View registry_test.exs
This file contains 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
defmodule KV.RegistryTest do | |
use ExUnit.Case, async: true | |
alias KV.Registry, as: Reg | |
# test helper module | |
defmodule Forwarder do | |
use GenEvent | |
def handle_event(event, parent) do | |
send parent, event |
NewerOlder