Skip to content

Instantly share code, notes, and snippets.

View derrekbertrand's full-sized avatar

Derrek Bertrand derrekbertrand

View GitHub Profile
@derrekbertrand
derrekbertrand / gist:5759101
Last active December 18, 2015 09:09 — forked from vshvedov/gist:1370650
Install Sublime Text 2 via PPA on Debian/LMDE
sudo apt-get install python-software-properties software-properties-common
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
@derrekbertrand
derrekbertrand / A5survive.md
Last active August 29, 2015 14:11
An A5 survival plan.

CSS Lovin'

  • Get ML to allow some CSS updates
  • Need mobile-friendly formatting
  • Add some CSS3 effects: rounded borders and fades
  • Add some texture to some backgrounds
  • Draft some imagery for A.cc
  • Just clean the site up to look newer and cleaner
@derrekbertrand
derrekbertrand / Checklist.md
Last active November 11, 2021 05:49
Security Checklist for using Laravel on Digital Ocean's LEMP app

Security Checklist

For setting up laravel on Ubuntu 14.04. Assumes using DO's LEMP image to start.

To start:

  • Install and update new software:
    • Run apt-get update
  • Run apt-get install php5-cli php5-mcrypt git
@derrekbertrand
derrekbertrand / ssh_mount.sh
Last active August 29, 2015 14:16
Mount SSH folder, and make damn sure it stays mounted.
#!/bin/bash
#should match 99.9% of SSH users
user_regex='[a-zA-Z][a-zA-Z0-9_]+'
#should match 90% of domains
host_regex='([a-zA-Z][a-zA-Z0-9\-]*\.)*[a-zA-Z][a-zA-Z0-9\-]*'
#should match paths starting with / and '' (which is valid for our use)
path_regex='(\/[A-Za-z0-9_\-\.]+)*\/?'
master_regex="^$user_regex\@$host_regex\:$path_regex\$"
@derrekbertrand
derrekbertrand / images.md
Created March 1, 2015 22:06
Concept for landscape replacement.

Ubuntu/Mint Imager

Looking into writing a free and open piece of software that will allow package management on workstations and servers.

Registration/Association

To register a workstation/server, they will need:

  • Install script
  • URL of API
@derrekbertrand
derrekbertrand / GridController.php
Last active August 29, 2015 14:16
Laravel 4.2 Controller for responding to bs_grid AJAX requests.
<?php
/*
* Usage: Point bs_grid to GridController@postModelName (make sure route is defined for the action)
* Whitelist models by making appropriate public methods.
* Controller will respond to basic use and sorting appropriately.
*/
class GridController extends BaseController {
@derrekbertrand
derrekbertrand / post_install.sh
Last active July 22, 2018 18:43
PHP development machine post install setup for Ubuntu 16.04/18.04 and Mint 18/19
#!/bin/bash
# Post install script for Ubuntu 18.04LTS and Mint 19LTS
# add the PHP PPA https://deb.sury.org/
sudo add-apt-repository -y ppa:ondrej/php
# set up node sources
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
# add Sublime Text 3 stable to your sources
@derrekbertrand
derrekbertrand / joel_test_web.md
Last active December 17, 2015 15:02
Joel Test Web Version

Joel Test - Web Application Edition

Ver. 1.3.3.7

The [Joel Test][1] is a great way to check if your potential employer or current employer has a good handle on their software team. [The Original Joel Test][1] is great, but it is aimed at complied languages in a non-web-application environment. This is a basic rephrasing of the test to suit web app development with minor updates for developing in 2015. The test is actually part of [posting a job on Stack Overflow][http://careers.stackoverflow.com/jobs/post], and rightfully so. The language just needed some updates for it to work for my company.

The test is simple. If your company meets the requirement, you get a point. If you don't meet the requirement, you don't get a point. There are 12 questions, so there are a possible of 12 points available. Simple enough, right?

As the original test says 12 out of 12 is perfect, 11 is okay, 10 or less is failing. The reason the test is so strict is because these are 12 HUGE

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpHRkx/e6BCf0n/feTn2FjewrItjjQyn3yKshxO07ycbZmneuOW68zm4PvnfoKQJpUp2kplEtRvRoP/TQBsjnYUStYgvsCMeuywzt4qW4aSloC4bmQ1JsPxyBTZVSId96ex26Q6tYp1iB0jS4esT7qz/xRM5wo5/ES69rJUVb6HW+3XH+RE05ZbCFlTvutRK/4bgldOmzHf368zud3CVf1Hc7jJl53l+ls0T1M5/jDgCCsLf5ftPJYMBTYSuLgWeQapXnQLh3VOn05rPvkcwwBsP1osilZGCm0CwDsvN5LKpb9OfQIYXyxacwAMr4DJE5f5BLJJl52sptw0Iym7zompkc/XmG0ZtbExhhCFWWHeMXjLdV+ibbO42eNPAt36LuZpOcAdbxR3oumfC2XhE6YH7OYv8v+GLEl9VBf9a74bDY77pweTJkwB05BVfvSsca/HUfxfIPN/RtFDTPyJnMHYxz1o14oxodWj/p4hyKzhOw9W5uME8UQRzmpFtAVuipISspdzb6AIxOuzaGweSNwNypKeE1nHL1NraQkl+RjGmUfPvqK2GcfeQOW1IXkZWeTvsPoMmDx1TGukKPA7FNcVy8/+VtcKhhD4hZ8iCy9S5Xb+60Qu1hNJSXzjt+zBDVCK9tSGvLTYyjclhwICZqFrgIaIL+kK3jDFhAiQ6d6+Q== [email protected]
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtGNdKLQ7aIGCksSZd808DPwcKeNwKTsv2vlRKIhJQ+o1ZlQXPK/N/1tLPM70mvHdajw6xwtVhO2jEBkgj/ksjE2dOnWUAGZT//E5TMucIWEvkgfLOBz3a0gkAKYcW69/WiL9vINBjgdISWKC9issHbQDKrb56Hxwu+to1hqAONm5/ZKx2CxQOaj7o4uTiwHpJlBZj0V3PoKXwLf2WB0uGRFGwx7QDQdaatD9yVijOcQ
@derrekbertrand
derrekbertrand / nginx_install.sh
Last active February 17, 2017 22:04
A CentOS 7 Security basics checklist.
#!/usr/bin/bash
NGINX_NPROC=`nproc`
NGINX_RPMREPO=https://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
#set up the repo
wget -qO nginx.rpm $NGINX_RPMREPO
yum install -y nginx.rpm > /dev/null
rm nginx.rpm