This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo "=== System Install Starting! ===" | |
# Variables | |
DL_DIR="$HOME/Downloads/EnvSetup" && mkdir -p "$DL_DIR" | |
BIN_DIR="$HOME/bin" && mkdir -p "$BIN_DIR" | |
source /etc/os-release #loads $UBUNTU_CODENAME | |
export DEBIAN_FRONTEND=noninteractive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$chromeExec = 'google-chrome'; | |
$inputFile = __DIR__.'/input.html'; | |
$outputFile = __DIR__.'/output.pdf'; | |
$version = shell_exec($chromeExec . ' --version 2>&1'); | |
if(!strpos($version, 'Google Chrome') === 0) { | |
throw new Exception('Google Chrome not found at: '.$chromeExec); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Variables | |
client_id="" | |
client_secret="" | |
scopes="" | |
auth_code="" | |
access_token="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Console-friendly function to batch update 301 redirects in Webflow. | |
* Existing redirects will be replaced when source matches but target doesn't. | |
* A rule w/ an empty target will remove existing matches but not replace them. | |
* Small wait time between each add/remove to allow ajax calls time to finish. | |
* Intended for use here: https://webflow.com/dashboard/sites/YOURSITE/hosting | |
* @example updateWebflowRedirects( [{ source: "/old", target: "/new" }] ); | |
*/ | |
async function updateWebflowRedirects(rules) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Variables | |
COMPOSER_HOME="$HOME/.composer" | |
HOSTS='/etc/hosts' | |
VHOST='/etc/apache2/sites-available/localdev.conf' | |
ERRLOG='/var/log/apache2/error.log' | |
# Fix SSH xterm-256color issue | |
alias ssh='TERM=xterm-color ssh' | |
# File Shortcuts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APP_URL=http://www.myproject.test | |
DB_CONNECTION=mysql | |
DB_HOST=localhost | |
DB_PORT=3306 | |
DB_DATABASE=myprojectdb | |
DB_USERNAME=homestead | |
DB_PASSWORD=secret | |
MAIL_DRIVER=smtp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let glob = require('glob'); | |
let mix = require('laravel-mix'); | |
let webpackMerge = require('webpack-merge'); | |
/** | |
* Laravel Mix extension for code splitting custom JS similar to extract() for vendor modules. | |
* @author @dccampbell | |
* @example mix.extractJs('/resources/js/api.js', 'public/js') | |
* @example mix.extractJs('/resources/js/store/*', 'public/js/store.js') | |
* @example mix.extractJs(['/js/lib.js', '/js/lib.*.js'], 'public/js/lib.js') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Ask for the administrator password upfront | |
sudo -v | |
# Install Homebrew | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" || exit 1 | |
# Configure Homebrew | |
brew doctor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[core] | |
autocrlf = input | |
eol = lf | |
[push] | |
default = current | |
[pull] | |
ff = only | |
[merge] | |
ff = false | |
[diff] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Apache Setup | |
# Variables | |
BIN_DIR="/usr/local/bin" | |
# Install Apache | |
#sudo apt install -y apache2 | |
# Change Apache User/Group |
NewerOlder