Skip to content

Instantly share code, notes, and snippets.

View scc-agnitio's full-sized avatar

Sam C. scc-agnitio

View GitHub Profile
#!/bin/bash
laravel new $1
# Change Dir
cd $1
# Update .env
sed -i "s/APP_NAME=Laravel/APP_NAME=$1/g" .env
sed -i "s/DB_DATABASE=laravel/DB_DATABASE=$1/g" .env
#go to the conf folder
cd /etc/apache2/sites-available
#create the new .conf file
sudo vi myapp.com.conf
#Add the following content to your .conf file
<VirtualHost *:80>
ServerAdmin webmaster@myapp.com
ServerName myapp.com
@scc-agnitio
scc-agnitio / post_install.sh
Created May 11, 2018 08:41 — forked from waleedahmad/post_install.sh
Ubuntu post installation script for installing software of your choice.
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
apt-get update && sudo apt-get upgrade -y
@scc-agnitio
scc-agnitio / FixCommandForMacKeyboard.md
Created April 26, 2018 13:34 — forked from digiter/FixCommandForMacKeyboard.md
Map Command Key to Control For ubuntu + mac keyboard

For each machine running xmodmap will give you the mapping and keycode, take a look first then write the script. I use ubuntu and mac keyboard. The below maps both left and right control and super.

Create an .Xmodmap file in your Linux home directory, with the following contents, then execute xmodmap .Xmodmap

clear control
clear mod4

keycode 37 = Super_L
keycode 105 = Super_R
@scc-agnitio
scc-agnitio / post_install.sh
Created April 16, 2018 13:35
PHP development machine post install setup for Ubuntu 16.04 LTS and Mint 18 LTS.
#!/bin/bash
# Post install script for Ubuntu 16.04LTS and Mint 18LTS
# add the PHP PPA https://deb.sury.org/
sudo add-apt-repository -y ppa:ondrej/php
# I believe even releases are LTS, so when 8 comes out should update
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
# add Sublime Text 3 stable to your sources
@scc-agnitio
scc-agnitio / install_lamp_16.sh
Last active April 17, 2018 13:47 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 16.04 - PHP development (php 7.1, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Terminator Terminal
sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator
# Install Fish Shell