Skip to content

Instantly share code, notes, and snippets.

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
@lukepolo
lukepolo / gist:fc8758e9255771f24610
Last active February 16, 2016 14:37 — forked from jfalotico/gist:ee2d3b49207935c6aa94
Install Mongo Homestead with PHP-7
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
/**
* 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();
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;
# 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
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';
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';
#!/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
@lukepolo
lukepolo / si
Created September 23, 2016 16:09
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
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