Skip to content

Instantly share code, notes, and snippets.

View hxtree's full-sized avatar

Matthew Heroux hxtree

View GitHub Profile
@hxtree
hxtree / README.md
Created December 28, 2019 02:58
PHP FPDF Font File Generation
@hxtree
hxtree / README.md
Last active October 7, 2020 16:59
Grep Frequently Used

Frequently Used Greps

Show 5 line after

grep -A 5

Show 5 lines before

grep -B 5

Case insentive

grep -i 'example'

@hxtree
hxtree / README.md
Last active May 25, 2020 11:31
Linux Screen

Linux Screens

Linux screens are great for running background tasks and are especially helpful when running a long process on a remote server due to SSH timelimits.

Start a new screen

screen

(Run commands for tasks)

Detach from a screen

@hxtree
hxtree / README.md
Last active January 22, 2020 19:59
PHP Google reCAPTCHA
@hxtree
hxtree / README.md
Last active January 23, 2020 18:01
Google Admin Quicklinks

GSuite Admin Console

Search email logs, enable disable users

https://admin.google.com

Google Cloud Directory Sync

Synchronize users, groups and other data from an Active Directory/LDAP service. If you're using OpenLDAP, you might be better of making your own as it only works with SHA1 at present (been waiting years to switch to SHA256 due to secuirty).

https://tools.google.com/dlpage/dirsync

@hxtree
hxtree / README.md
Created January 23, 2020 20:55
Centos 8 Using Outdated Encryption

Enabling Legacy Ciphers

On CentOS 8 you may find yourself unable to connect to an old radius server using NetManager, etc. This may be because unsecure ciphers are disabled by default in Centos 8. You can enable these back again using the following

update-crypto-policies --set LEGACY reboot

Check ciphers

/usr/bin/openssl ciphers -v

@hxtree
hxtree / README.md
Created January 24, 2020 16:21
Linux RTFM

Quick tips on reading the Linux Manual

Search for a manual to read

apropos ssh

alternatively

man -k ssh
@hxtree
hxtree / README.md
Created January 24, 2020 16:25
VIM Quick Start Guide

Looking for a VIM quick start up guide?

Chances are you already have one. The package vimtutor installs often comes preinstalled with vim. The tutor is designed to describe enough of the commands that you will be able to easily use Vim as an all-purpose editor.

$ vimtutor
@hxtree
hxtree / README.md
Last active January 24, 2020 17:17
UML References