Skip to content

Instantly share code, notes, and snippets.

View MartinBucko's full-sized avatar
💚
200 OK

Martin Bučko MartinBucko

💚
200 OK
View GitHub Profile
@MartinBucko
MartinBucko / setup.sh
Created May 31, 2020 03:04 — forked from MakiseKurisu/setup.sh
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
@MartinBucko
MartinBucko / badips-ipset.sh
Created June 5, 2019 21:20 — forked from JadedDragoon/badips-ipset.sh
A script to create and update an ipset with ip addresses retrieved from the badips.com blacklist. (With just a little effort should work with url to any source of IPs separated by newlines)
#!/bin/bash
# Script for blocking IPs which have been reported to www.badips.com
# via ipsets.
#
# - THIS SCRIPT DOES NOT BLOCK ANYTHING -
# This script only updates ipsets with applicable data from
# badips.com. Actually blocking the ips in that ipset is left
# up to the user (so that you may do so however you prefer).
#
# Additionally, this script does not persist the ipsets through
@MartinBucko
MartinBucko / moleculer-service.js
Last active January 20, 2019 02:57
moleculer service example template
'use strict';
module.exports = {
name: 'greeter',
/**
* Service settings
*/
settings: {},
@MartinBucko
MartinBucko / feathersjs-hook.js
Created January 18, 2019 15:54
Feathers JS hook example
// Use this hook to manipulate incoming or outgoing data.
// For more information on hooks see: http://docs.feathersjs.com/api/hooks.html
module.exports = function (options = {}) { // eslint-disable-line no-unused-vars
return async context => {
const { data } = context;
// Throw an error if we didn't get a text
if(!data.text) {
throw new Error('A message must have a text');
image: someting/myclientfront
ENV:
ROOT_URL=https://testing.testdomain.com/
API_LOCAL_URL=http://myclientback/api
API_URL=https://testing.testdomain.com/api/
PORT=3000
Labels:
traefik.enable=true
@MartinBucko
MartinBucko / openvpn-in-lxd.txt
Created May 15, 2018 17:43 — forked from wastrachan/openvpn-in-lxd.txt
OpenVPN in LXD Container
# On the host
=============
lxc config set openvpn raw.lxc 'lxc.cgroup.devices.allow = c 10:200 rwm'
lxc config device add openvpn tun unix-char path=/dev/net/tun
# In the container
==================
1. mknod /dev/net/tun c 10 200