This file contains hidden or 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
server { | |
listen 443 ssl; | |
ssl_certificate /etc/letsencrypt/live/helloworld.letsencrypt.org/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/helloworld.letsencrypt.org/privkey.pem; | |
ssl_trusted_certificate /etc/letsencrypt/live/helloworld.letsencrypt.org/fullchain.pem; | |
ssl_session_timeout 1d; | |
ssl_session_cache shared:SSL:50m; | |
# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits |
This file contains hidden or 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
sudo apt-get install pkg-config libssl-dev | |
sudo pecl install mongodb | |
echo set completion-ignore-case on | sudo tee -a /etc/inputrc | |
// BASH PROFILE | |
SSH_ENV=$HOME/.ssh/environment | |
# start the ssh-agent |
This file contains hidden or 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
/** | |
* Create a Symfony response for the given exception. | |
* | |
* @param \Exception $e | |
* @return mixed | |
*/ | |
protected function convertExceptionToResponse(Exception $e) | |
{ | |
if (config('app.debug')) { | |
$whoops = new Run(); |
This file contains hidden or 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
server { | |
listen 80 default_server; | |
# Only if you want SSL | |
# listen 443 ssl; | |
server_name _; | |
root /home/vagrant/Code/$host/public; | |
index index.html index.htm index.php; | |
charset utf-8; |
This file contains hidden or 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
# Install dnsmasq | |
brew install dnsmasq | |
# Copy the default configuration file. | |
cp $(brew list dnsmasq | grep /dnsmasq.conf.example$) /usr/local/etc/dnsmasq.conf | |
# Copy the daemon configuration file into place. | |
sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/ | |
# Start Dnsmasq automatically. | |
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist |
This file contains hidden or 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
var base_path = __dirname.replace('resources/node', ''); | |
require('dotenv').config({ | |
path: base_path + '.env' | |
}); | |
var env = process.env; | |
/* Illuminate\Auth\SessionGuard@getName */ | |
var loginSHA1 = 'login_web_59ba36addc2b2f9401580f014c7f58ea4e30989d'; |
This file contains hidden or 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
var base_path = __dirname.replace('resources/node', ''); | |
require('dotenv').config({ | |
path: base_path + '.env' | |
}); | |
var env = process.env; | |
/* Illuminate\Auth\SessionGuard@getName */ | |
var loginSHA1 = 'login_web_59ba36addc2b2f9401580f014c7f58ea4e30989d'; |
This file contains hidden or 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 | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Mathias Leppich <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or 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
If had things with 500 lines of code in I woulnd't be proud of it because its not speific enough for the class, but you asked : | |
This is from my package : https://raw.githubusercontent.com/lukepolo/laracart/master/src/LaraCart.php V1 | |
V2 is much cleaner, and technically if you included the traits it would be still 500 lines :-) | |
https://raw.githubusercontent.com/lukepolo/laracart/2.0/src/LaraCart.php | |
<?php |
This file contains hidden or 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
cat > /etc/apt/apt.conf.d/50unattended-upgrades << EOF | |
Unattended-Upgrade::Allowed-Origins { | |
"Ubuntu xenial-security"; | |
}; | |
Unattended-Upgrade::Package-Blacklist { | |
// | |
}; | |
EOF | |
cat > /etc/apt/apt.conf.d/10periodic << EOF |