Skip to content

Instantly share code, notes, and snippets.

View gregdotca's full-sized avatar

Greg Chetcuti gregdotca

View GitHub Profile
@gregdotca
gregdotca / gist:74459d89a60542ad0d08
Created May 4, 2015 17:22
Vagrant & MySQL 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:
@gregdotca
gregdotca / gist:c41e98d013d971e4d0e3
Created May 6, 2015 18:54
Vagrant & MySQL Issue (Part 2)
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:
@gregdotca
gregdotca / 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:
@gregdotca
gregdotca / 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
@gregdotca
gregdotca / 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>
@gregdotca
gregdotca / 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)

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:

@gregdotca
gregdotca / 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
@gregdotca
gregdotca / 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'])) {
@gregdotca
gregdotca / 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)
//////////////////////////////////////////////////