Skip to content

Instantly share code, notes, and snippets.

View chetcuti's full-sized avatar

Greg Chetcuti chetcuti

View GitHub Profile
@chetcuti
chetcuti / gist:72afc0056189fb9ca0675f905c3c5651
Created August 20, 2021 18:04
Homelab Diagram (draw.io)
This file has been truncated, but you can view the full file.
<mxfile modified="2021-08-19T15:48:50.864Z" host="app.diagrams.net" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.134 Safari/537.36" etag="T19hsYyo-ztdnkQTvMvV" version="14.9.8" type="device"><diagram id="I7SmX8DAzSkreJeUHtu-" name="Page-1">7H1Zl5pK9/enOWs9/4u4mIdLQREHFEURucliVAZBmeXi/exvFT3Ege50TtpOTjp9TrqVoShq//ZYu3b9g/P7apAYh50U2074D4bY1T947x8MQykM+wf+j9inhyMMQj4c2Cae/XjRtwOKVzuPB5HHo7lnO+nFhVkch5l3uDxoxVHkWNnFMSNJ4vLyMjcOL596MLbOzQHFMsLbo2vPznaPR1GK/XZCdLzt7unRFEk8nDENK9gmcR49PvAfDBean4fTe+Opscc3TXeGHZdnh/D+PzifxHH28Glf8U4IB/dp3B7uE144+9zxxImyt9yQkVTs2JRTbefpF+eLvNPY6Rf8oZXCCHPn6TWazmanpxFyIrsLBxp8i+IIHOR22T4E31DwMc2SOHD4OIyT5mqcohCE55/PPI0pDo44lZdp4DPSIWnq8fum+U4xxOP3HgQW8vTldPZFdhJv72RO8njMjaPs7LlI8wOvtQF9H3sfJ9ku3saREfa/HeXAeCWnh47gJPp0APbkC9JBEPzpyLe+NN9O59+ue3NLjEf6wO6cHXgkzcCJwd3JCVxQfkMd+YiU3Rneno4lTmhkXnGJWuMR/Nvn5p6fIMce6AmGPDIqydAdFMNJhsRInCUw6qGBR6bFCLqD4CxFgk9gKDGWumw/jfPEch6bPIfY1VNQ+BSKoDCKoUiKRhn88jEMID1J0xSOEThLIsTlUzIj2TrZzVMA+IzT2WUHeEH6yqsSxPXLvd
@chetcuti
chetcuti / ansible-install-virtualmin.yml
Created August 23, 2020 00:50
ansible-install-virtualmin.yml
---
- hosts: virtualmin
remote_user: '{{ standard_user }}'
become: true
become_method: sudo
tasks:
- name: 'remove unneeded packages'
apt:
name:
- libnet-ssleay-perl
@chetcuti
chetcuti / wb.php
Created September 6, 2019 23:03
PHP script (with form) to update the Pi-hole whitelist and blacklist entries
<?php
//////////////////////////////////////////////////
// This script is still a work in progress...
//////////////////////////////////////////////////
// Whitelist: list=w / Blacklist: list=b
// Add: action=a / Delete: action=d
// Domain: domain=example.com
// Example: http://pihole/wb.php?list=w&action=a&example.com (This will add example.com to the Pi-hole whitelist)
//////////////////////////////////////////////////
@chetcuti
chetcuti / add.php
Created February 3, 2019 18:45
Pi-hole Whitelist & Blacklist Addition Script
<?php
// Bookmark: javascript:void(window.open('http://pi.hole/add.php?action=w&url='+location.href, '_blank'));
// Modify the above URL accordingly
// Whitelist: action=w
// Blacklist: action=b
$action = $_GET['action'];
if (isset($_GET['url'])) {
@chetcuti
chetcuti / linux.txt
Last active October 12, 2020 00:55
Linux
********** ALL SHELLS **********
All Users
echo "" >> ~/.vimrc && echo "set nocompatible" >> ~/.vimrc
********** ZSH **********
All Users
sudo apt install git zsh && sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && echo "" >> ~/.zshrc
echo "alias vi='vim'" >> ~/.zshrc && echo "alias dir='ls -hlp --group-directories-first'" >> ~/.zshrc && echo "alias dira='ls -Ahlp --group-directories-first'" >> ~/.zshrc && head -n -3 ~/.oh-my-zsh/themes/steeef.zsh-theme > ~/.oh-my-zsh/themes/greg.zsh-theme && sed -i -- 's/robbyrussell/greg/g' ~/.zshrc

Keybase proof

I hereby claim:

  • I am chetcuti on github.
  • I am chetcuti (https://keybase.io/chetcuti) on keybase.
  • I have a public key ASBbuvAVr-Hp1uVV15CAFHcZfqaplYO-522b3qO7pgKbBQo

To claim this, I am signing this object:

@chetcuti
chetcuti / Pok3r.ahk
Last active May 25, 2018 22:49 — forked from a-chen/Pok3r-keybinds.ahk
Pok3r keybinds including media and volume controls
#CommentFlag //
#InstallKeybdHook
// Original Author: Jarvis Prestidge
// Enhanced by: Andrew Chen
// =========================
// Pok3r Layout Marcos
// =========================
// Includes Media Keys (Previous|Q, Play/Pause|W, Next|E)
@chetcuti
chetcuti / Pok3r.ahk
Created May 25, 2018 22:42 — forked from JarvisPrestidge/Pok3r.ahk
Personal AutoHotKey script that turns any keyboard into a Pok3r.
#CommentFlag //
#InstallKeybdHook
// Author: Jarvis Prestidge
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard
// on any keyboard without programmable keys. i.e. my laptop ^^
// <COMPILER: v1.1.22.00>
@chetcuti
chetcuti / nginx.conf
Created January 28, 2016 05:05 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@chetcuti
chetcuti / gist:939dc4a43439add3af3e
Created May 7, 2015 16:06
Vagrant & Session Permissions Issue
vagrantfile:
target: local
vm:
box: puphpet/centos65-x64
box_url: puphpet/centos65-x64
hostname: c6x64.p56.m56
memory: '512'
cpus: '1'
chosen_provider: virtualbox
network: