Skip to content

Instantly share code, notes, and snippets.

View Crowles's full-sized avatar

Chris Rowles Crowles

View GitHub Profile
@Crowles
Crowles / dbkeygen
Last active May 24, 2018 22:18
dbkeygen
#!/bin/bash
keyGen() {
echo "Generating keys..."
i=1
for ro in {1..15}
do
openssl rand -hex 16 | while read line;
do
echo "$i;$line" >> keys
done
@Crowles
Crowles / install.sh
Created April 20, 2018 10:33
Guest Additions
#!/bin/bash
echo "Installing EPEL Repository"
yum -y install epel-release
echo "Updating Packages"
yum update
echo "Installing Development Tools"
yum -y groupinstall "Development Tools"
@Crowles
Crowles / virtualhost.sh
Created February 6, 2018 15:56
Script to quickly create Apache vhosts on Red Hat systems
# FORKED FROM https://github.com/RoverWire/virtualhost
# Credit goes to Luis Felipe Perez (@RoverWire)
#!/bin/bash
### Set Language
TEXTDOMAIN=virtualhost
### Set default parameters
action=$1
domain=$2

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@Crowles
Crowles / CaptchaTrait.php
Last active November 10, 2017 14:10
Google's reCAPTCHA trait class - use with google/recaptcha package.
<?php
/**
* Reusable Captcha trait.
*
* to use this trait, simply include it inside your class via use statement.
* Then you just need to call $this->captchaCheck();
*/
namespace App\Http\Traits;
use Illuminate\Support\Facades\Input;
@Crowles
Crowles / VSCode_Windows
Created November 10, 2017 10:20
My VSCode User Settings
{
"terminal.integrated.shell.windows": "C:\\Users\\christopher.rowles\\AppData\\Local\\Programs\\Git\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"--login",
"--init-file",
"C:\\Users\\christopher.rowles\\AppData\\Local\\Programs\\Git\\etc\\profile"
]
}
@Crowles
Crowles / install.txt
Created August 16, 2017 19:38
Powerline install instructions.
sudo pip install git+git://github.com/Lokaltog/powerline
wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf
sudo mv PowerlineSymbols.otf /usr/share/fonts/
sudo fc-cache -vf
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/
@Crowles
Crowles / stream.py
Last active June 27, 2017 18:53
Python Twitter stream
#!/usr/bin/env python
from TwitterAPI import TwitterAPI
CONSUMER_KEY = ''
CONSUMER_SECRET = ''
ACCESS_TOKEN_KEY = ''
ACCESS_TOKEN_SECRET = ''
api = TwitterAPI(
@Crowles
Crowles / extra
Last active August 16, 2017 20:02
Vagrant VM - extra provisioning script - merging individual scripts.
#!/bin/bash
if ! type vim > /dev/null; then
echo "installing vim"
yum install -y vim
else
echo "Vim installed, continuing"
fi
if ! type dos2unix > /dev/null; then
@Crowles
Crowles / .bashrc
Last active October 23, 2018 15:34
Useful aliases, commands, ini configs etc. (general resource)
alias statc="stat -c '%a %G:%U %n'"
alias ccat="pygmentize -g"
alias tlog="tail -f -n 0 storage/logs/laravel.log"
alias phpcf="php --ini | grep 'Loaded'"
eval $(thefuck --alias)
# custom functions
# IP Lookup
function rip