Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Used to log info to stdout
function console_log() {
echo -e "\x1B[34m--- $1\x1B[0m\n"
}
#
# Install Apache
#
<?php
public function index()
{
$users = User::all();
$level = $this->showLevel('test');
return view('home')->with('users', $users);
}
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Jared Flack</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content=""><meta name="author" content=""><meta http-equiv="X-UA-Compatible" value="IE=8"><style>@font-face{font-family:Lato;font-style:normal;font-weight:400;src:local('Lato Regular'),local('Lato-Regular'),url(data:application/x-font-woff;charset=utf-8;base64,AAEAAAARAQAABAAQR1BPU792x2wAAS2AAAASSkdTVUKOOI56AAE/zAAAAHBPUy8y2a6qaQAAyigAAABgY21hcIwYkAAAAMqIAAAAtGN2dCAG9xijAADScAAAAC5mcGdtclpyQAAAyzwAAAblZ2FzcAASABgAAS10AAAADGdseWbADxfjAAABHAAAw2BoZWFk/JzyIwAAxlwAAAA2aGhlYQ+2B3UAAMoEAAAAJGhtdHhyNU6fAADGlAAAA25rZXJuPzs/sgAA0qAAAFcYbG9jYazff4oAAMScAAABvm1heHAB1wf5AADEfAAAACBuYW1lHCc4mgABKbgAAAF4cG9zdFbkDTYAASswAAACQXByZXCmB5UXAADSJAAAAEsABAAtAAAD+wWZACUANQA5AD0A/kAWPTw7Ojk4NzY0MiooJCIfHRMSBgQKBytLsF9QWEBDAAECAAEeAAMCAQIDATIAAQQCAQQwAAAAAgMAAgEAJgAEAAUIBAUBACYACQkGAAAkAAYGCx8ACAgHAAAkAAcHDAcgCRtLsGxQWEBBAAECAAEeAAMCAQIDATIAAQQCAQQwAAYACQAGCQ
@flackend
flackend / 2column-email
Last active August 29, 2015 14:15
Responsive, two-column email template. From MailChimp. Removed MailChimp variables and attributes and cleaned up comments in the markup.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!-- ||||||||||||||||||||||||||||||| -->
<!-- EMAIL SUBJECT SHOULD GO IN HERE -->
<title>THIS IS THE TITLE</title>
<!-- EMAIL SUBJECT SHOULD GO IN HERE -->
<!-- ||||||||||||||||||||||||||||||| -->
<style type="text/css">
# Tail Laravel and Webserver (NGINX & Apache 2) log files
# Compatible with Laravel 4 & 5
#
alias tl="ls -d /var/log/nginx/* /var/log/apache2/* storage/logs/* app/storage/logs/* storage/laravel.log | grep -v 'gz$' | grep -v '1$' | xargs tail -f"
@flackend
flackend / README.md
Last active August 29, 2015 14:07 — forked from jonathantneal/README.md

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.


Configuring Apache

@flackend
flackend / Redirect After Session Expires.md
Last active October 20, 2018 12:44
Example solution to handling re-authentication after session expires for AJAX requests.

When a user's session expires and they're on a page that uses ajax requests, you need to set up something to gracefully handle reauthenticating. In this example, we prompt the user and redirect them to the login page.

demo

For Laravel, in your auth filter:

<?php
Route::filter('auth', function()
{