Skip to content

Instantly share code, notes, and snippets.

View dz0ny's full-sized avatar
💭
❤️✖️❓🤖

Janez Troha dz0ny

💭
❤️✖️❓🤖
View GitHub Profile
@dz0ny
dz0ny / printer-prusa-mk3s-2021-bondtech.cfg
Last active March 3, 2023 09:08 — forked from nikolak/printer-prusa-mk3s-2021.cfg
Klipper MK3S/+ Config including optional Bondtech Extruder, Bear Extruder, etc.
# This file contains pin mappings and reasonable defaults for Prusa i3 MK3S
# printers. It will work with MK3 (non-S) by selecting the alternative filament
# sensor. References to common community mods are included as well.
#
[include mainsail.cfg]
[skew_correction]
[force_move]
@dz0ny
dz0ny / foo.php
Last active November 2, 2021 20:00
<?php
/*
Plugin Name: UPN plačilni nalog
Plugin URI: https://woocart.com
Description: Doda UPN plačilni nalog s QR kodo v vašo WooCommerce trgovino.
Version: 1.1.0
Author: WooCart
Author Email: info@woocart.com
License: GPLv2 or later
*/
@dz0ny
dz0ny / install.md
Last active November 2, 2021 12:43
SUM USP on GitHub Projects
<?php
add_action('graphql_register_types', 'PostsWithPaginationConnection', 99);
function PostsWithPaginationConnection()
{
$connection_args = array_merge(['offset' => [
'type' => 'Int',
'description' => __('Offset for current results', 'wp-graphql'),
]], \WPGraphQL\Connection\PostObjects::get_connection_args());
$config = [
'fromType' => 'RootQuery',
<?php
/*
Plugin Name: WooCart Machine Objects Cache
Description: Cache for localization files.
Version: 1.5.0
*/
class TexDomainCache
{
[input_source]
library=builtin
label=source
purpose=capture
disable=(not (equal? dsp_name "extmic_eq"))
output_0={in_src:0}
output_1={in_src:1}
[input_sink]
library=builtin
var_export(timezone_identifiers_list());
array (
0 => 'Africa/Abidjan',
1 => 'Africa/Accra',
2 => 'Africa/Addis_Ababa',
3 => 'Africa/Algiers',
4 => 'Africa/Asmara',
5 => 'Africa/Bamako',
6 => 'Africa/Bangui',
7 => 'Africa/Banjul',
@dz0ny
dz0ny / readme.md
Last active May 28, 2018 11:25
VPN ClusterRole

kubectl create serviceaccount manager@vpnui

@dz0ny
dz0ny / buildHAProxy.sh
Last active October 25, 2019 05:23 — forked from codingtony/buildHAProxy.sh
Recipe to build HAProxy 1.8 using LibreSSL. Builds an almost static binary. See https://github.com/codingtony/docker-build-haproxy for how to use with a Docker Image
#!/bin/bash -e
DIR=$PWD/work
mkdir -p ${DIR}
rm -f ${DIR}/*.tar.gz
LIBRESSL=libressl-2.4.5
HAPROXY=haproxy-1.8.4
PCRE=pcre-8.39
dev="vpn-swan"
gw=$(ip a show $dev| grep "inet\b" | awk '{print $2}' | cut -d/ -f1)
ip rule del from 10.10.10.0/24
ip rule add from 10.10.10.0/24 priority 10 table 100
ip route add 10.10.10.0/24 dev $dev table 100
ip route add default via $gw dev $dev table 100
ip route flush cache
iptables -I FORWARD -o $dev -j ACCEPT
iptables -t nat -I POSTROUTING -o $dev -j MASQUERADE