Skip to content

Instantly share code, notes, and snippets.

@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

# 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 / 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">
<!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
<?php
public function index()
{
$users = User::all();
$level = $this->showLevel('test');
return view('home')->with('users', $users);
}
#!/bin/bash
# Used to log info to stdout
function console_log() {
echo -e "\x1B[34m--- $1\x1B[0m\n"
}
#
# Install Apache
#
body {
background: #f1f1f0 !important;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif !important;
font-weight: 300 !important;
}
/* h3 {font-weight:300 !important} */
.header-woof {display:none !important}
@flackend
flackend / generate.js
Last active October 8, 2015 09:45
I wrote this to automate somewhat the task of moving some WordPress data to a new install. Didn't have Administrative permissions or server access so had to manually copy and paste. This method made it a lot faster. One script generates a payload and the other uses that payload to fill the form fields.
// GENERATE
function getScript(url, callback) {
var head = document.documentElement,
script = document.createElement('script'),
done = false;
script.src = url;
script.onload = script.onreadystatechange = function() {