Skip to content

Instantly share code, notes, and snippets.

Avatar

Julian Pawlowski jpawlowski

View GitHub Profile
@jpawlowski
jpawlowski / powershell.json
Created Aug 16, 2020 — forked from rkeithhill/powershell.json
PowerShell snippets file for Visual Studio Code - place in your ~\AppData\Roaming\Code\User\Snippets directory
View powershell.json
{
"Condition statement": {
"prefix": "cond",
"body": [
"${_} { ${0}; break }"
],
"description": "Switch condition statement"
},
"Condition single quoted string statement": {
@jpawlowski
jpawlowski / gist:4d1d096432f0f54164ed29188f083586
Last active Oct 6, 2019
macOS Catalina 10.5 GM Direct Download Link
View gist:4d1d096432f0f54164ed29188f083586
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/AppleDiagnostics.chunklist
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/AppleDiagnostics.dmg
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/BaseSystem.chunklist
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/BaseSystem.dmg
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/InstallESDDmg.pkg
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/InstallInfo.plist
http://swcdn.apple.com/content/downloads/22/22/061-26769-A_7W1UT0LW93/hvmo0d13zco309g89ia09j6cdk6blq8fsm/RecoveryHDMetaDmg.pkg
View IT_naming_schema.md

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 / reclaimWindows10.ps1
Created Mar 23, 2018 — 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)
View reclaimWindows10.ps1
##########
# 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 / get_hk_services.sh
Created Dec 4, 2016
Extract all Homekit services and characteristics from homebridge HomeKitTypes.js
View get_hk_services.sh
#!/bin/bash
cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Service."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g'
echo " "
cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Characteristic."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g'
View macOS pre-relase Catalog URLs
# macOS Sierra Public Beta
sudo /usr/sbin/softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12beta-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
# or
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL https://swscan.apple.com/content/catalogs/others/index-10.12beta-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
# macOS Sierra Developer Beta
sudo /usr/sbin/softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12seed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
# or
sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL https://swscan.apple.com/content/catalogs/others/index-10.12seed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz
@jpawlowski
jpawlowski / install_rsyslog_centrallogging_centos7.md
Last active Nov 3, 2019
Configure rsyslogd on CentOS 7 as Remote Syslog Server
View install_rsyslog_centrallogging_centos7.md

Configure rsyslogd on CentOS 7 as Remote Syslog Server

echo "\$ModLoad imudp" > /etc/rsyslog.d/server.conf
echo "\$UDPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$ModLoad imtcp" >> /etc/rsyslog.d/server.conf
echo "\$InputTCPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$PreserveFQDN on" >> /etc/rsyslog.d/server.conf

yum -y install rsyslog-gnutls rsyslog-mysql rsyslog-crypto
@jpawlowski
jpawlowski / install_cups+airprint_centos7.md
Last active Sep 30, 2020
Install and configure CUPS 2.1.2 on CentOS 7 (LXC running on Proxmox VE) host including AirPrint
View install_cups+airprint_centos7.md

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 / zabbix_snmp_setup.md
Last active Mar 5, 2020
SNMPTT installation on CentOS 7 for Zabbix integration
View zabbix_snmp_setup.md

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/
@jpawlowski
jpawlowski / zabbix_mibs_vendors_link.sh
Last active Mar 14, 2020
SNMP MIB and SNMPTT helper script for Zabbix integration
View zabbix_mibs_vendors_link.sh
You can’t perform that action at this time.