Skip to content

Instantly share code, notes, and snippets.

View jpawlowski's full-sized avatar

Julian Pawlowski jpawlowski

View GitHub Profile
@jpawlowski
jpawlowski / profile.ps1
Created January 2, 2022 16:41 — forked from SteveL-MSFT/profile.ps1
PowerShell Prompt
#Requires -Version 7
# Version 1.2.10
# check if newer version
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e"
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version')
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)"
if ([System.IO.File]::Exists($latestVersionFile)) {
@jpawlowski
jpawlowski / msys_hetzner-etc_network_interfaces
Created August 12, 2012 12:06
Debian network configuration for Proxmox VE server running on a Hetzner host
# /etc/network/interfaces
#
auto lo
iface lo inet loopback
# device: eth0
iface eth0 inet manual
# IPv4 bridge
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!)
@jpawlowski
jpawlowski / PS5SemanticVersion.ps1
Created February 17, 2024 12:14
PowerShell class for extended Semantic Version support that is compatible with PowerShell 5.1 to parse, compare, and sort version strings.
class SemanticVersionExtended {
<#
.SYNOPSIS
Represents a Semantic Version (SemVer).
#>
[int]$Major
[int]$Minor
[int]$Patch
[System.Collections.ArrayList]$PreReleaseLabel
[System.Collections.ArrayList]$BuildLabel
@jpawlowski
jpawlowski / install_cups+airprint_centos7.md
Last active November 18, 2023 13:17
Install and configure CUPS 2.1.2 on CentOS 7 (LXC running on Proxmox VE) host including AirPrint

Basic setup, e.g. enable ssh

yum -y install epel-release
yum -y upgrade
yum -y install openssh-server net-tools iputils psmisc less which man mc bash-completion bash-completion-extras bash-argsparse bind-utils traceroute htop mtr
echo "export HISTTIMEFORMAT='%F %T  '" > /etc/profile.d/history.sh
echo "export HISTIGNORE='ls -l:pwd:date:'" >> /etc/profile.d/history.sh
echo "export HISTCONTROL=ignoredups" >> /etc/profile.d/history.sh
systemctl enable sshd
systemctl start sshd
@jpawlowski
jpawlowski / IT_naming_schema.md
Created April 19, 2018 15:51
IT naming schema

IT Naming Schema - RfC DRAFT 2016-001


DNS SUFFIX AND SEARCH

DOMAIN NAMES:

intdomain.tld - technical internal use extdomain.tld - technical external use internal.company.tld - nice looking internal names in accordance with company name to satisfy marketing aspects; should mostly be CNAMEs to intdomain.tld company.tld - nice looking names in accordance with company name to satisfy marketing aspects; should mostly be CNAMEs to extdomain.tld

@jpawlowski
jpawlowski / brew-sync.sh
Last active September 26, 2023 19:54
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@jpawlowski
jpawlowski / haproxy.cfg
Last active May 31, 2023 05:41
Geeking out with HAproxy on pfSense: The ultimate port 443 TLS/SSL router | http://loredo.me/post/116633549315/geeking-out-with-haproxy-on-pfsense-the-ultimate
global
maxconn 2000
stats socket /tmp/haproxy.socket level admin
uid 80
gid 80
nbproc 1
chroot /tmp/haproxy_chroot
daemon
tune.ssl.default-dh-param 2048
# Modern browser compatibility only as mentioned here:
@jpawlowski
jpawlowski / reclaimWindows10.ps1
Created March 23, 2018 14:01 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults)
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> based on my personal preferences.
# Version: 2.12.1, 2018-03-15
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@jpawlowski
jpawlowski / milight.pl
Last active September 25, 2022 20:17
LED Wifi control script for MiLight, EasyBulb, iBulb, LinkUP, Kepsun
#!/usr/bin/perl -w
#
# LED Wifi control script for MiLight, EasyBulb, iBulb, LinkUP, Kepsun
# ====================================================================
#
#
# Copyright (C) 2013, Julian Pawlowski <julian.pawlowski@gmail.com>
# All rights reserved.
#
# License: Simplified BSD / FreeBSD License
@jpawlowski
jpawlowski / zabbix_snmp_setup.md
Last active May 18, 2022 19:59
SNMPTT installation on CentOS 7 for Zabbix integration

SNMPTT installation on CentOS 7 for Zabbix integration

yum install wget make gcc net-snmp net-snmp-utils

cd /usr/local/src
wget http://downloads.sourceforge.net/project/snmptt/snmptt/snmptt_1.4/snmptt_1.4.tgz

tar xfz snmptt_*.tgz
snmp_*
cp -rv snmptt snmpttconvert snmpttconvertmib snmptthandler-embedded /usr/sbin/