Skip to content

Instantly share code, notes, and snippets.

View morsik's full-sized avatar

Konrad Mosoń morsik

View GitHub Profile
FROM prom/prometheus:v2.51.2
COPY prometheus.yml /etc/prometheus/prometheus.yml
COPY web.yml /etc/prometheus/web.yml
COPY entrypoint.sh /entrypoint.sh
ENV TZ=Europe/Warsaw
ENTRYPOINT ["/entrypoint.sh"]
@morsik
morsik / XR-18-Karaoke.scn
Created November 27, 2023 09:52
XR-18 Karaoke Scene
/config/chlink OFF OFF OFF OFF ON ON ON OFF
/config/buslink ON ON OFF
/config/linkcfg ON ON ON ON
/config/solo 0.0 LRAFL 0.0 PFL PFL -20 OFF OFF OFF OFF
/config/amixenable ON ON
/config/amixlock OFF OFF
/config/mute OFF OFF OFF OFF
/ch/01/config "SLAVKO" 3 In01 U01
/ch/01/preamp +0.0 OFF OFF ON 121
/ch/01/gate OFF EXP4 -48.0 60.0 7 502 983 Ch03
@morsik
morsik / docker_update_get_old_attrs.py
Created December 28, 2017 11:27
Get all attributes for Docker API update command
def _get_old_attrs(service):
_s = service.attrs['Spec']
_t = _s['TaskTemplate']
_c = _t['ContainerSpec']
return {
'image': _c['Image'],
#command (list of str or str) – Command to run.
#args (list of str) – Arguments to the command.
'constraints': _t['Placement'].get('Constraints'),
@morsik
morsik / assert_test.py
Created February 14, 2015 15:45
assert_test.py
def test(a):
assert type(a) == str
print("Text: {0}".format(a))
test(123)
test([1, 2, 3])
test("abc")
test(None)
@morsik
morsik / keybase.md
Created January 12, 2015 19:27
keybase.md

Keybase proof

I hereby claim:

  • I am morsik on github.
  • I am morsik (https://keybase.io/morsik) on keybase.
  • I have a public key whose fingerprint is EE2A BCDB 1297 D521 AF46 0404 990D D430 090A 5BEC

To claim this, I am signing this object:

@morsik
morsik / etldl.sh
Last active December 16, 2015 11:39
#!/bin/bash
#
# Enemy Territory: Legacy installation script
#
URL_ETL="http://mirror.etlegacy.com/etlegacy-linux-2.71rc1.tar.gz"
URL_ETWOLF="http://ftp.gwdg.de/pub/misc/ftp.idsoftware.com/idstuff/et/linux/et-linux-2.60.x86.run"
F_ETWOLF="et-linux-2.60.x86.run"
#!/usr/bin/perl -w
use strict;
use warnings;
use Net::Ping;
my @hosts = (
'localhost.localdomain',
);
@morsik
morsik / rc.lua
Last active December 15, 2015 13:18
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer set Master 2+") end),
awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer set Master 2-") end),
awful.key({ modkey, }, "Pause", function () awful.util.spawn("xscreensaver-command -lock") end),
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
from django import template
from django.utils.safestring import mark_safe
import re
register = template.Library()
@register.filter
def colorize(t, a='white'):
if t == None:
SSH_ENV="$HOME/.ssh/environment"
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV"
chmod 600 "$SSH_ENV"
. "$SSH_ENV" > /dev/null