Skip to content

Instantly share code, notes, and snippets.

@jay74jung
jay74jung / add_apache_brew.md
Created June 16, 2017 02:20 — forked from vitorbritto/add_apache_brew.md
Install Apache with Homebrew

Install Apache with Homebrew

Installing Apache

# Start by stopping the built-in Apache, if it's running, and prevent it from starting on boot.
# This is one of very few times you'll need to use sudo:
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

# We need to tap homebrew-dupes because "homebrew-apache/httpd22" relies on "homebrew-dupes/zlib"

and install Apache 2.2 with the event MPM, and we'll use Homebrew's OpenSSL library

@jay74jung
jay74jung / README.md
Created December 15, 2017 01:59 — forked from egermano/README.md
Align Directive for AngularJS

Align

Align a element base on multiples values, like a, top, bottom, middle, right, left and center.

Usage

<div class="recipes clearfix" align="middle center" align-watch="recipes">
    ...
</div>
@jay74jung
jay74jung / install_lamp_16.sh
Created February 4, 2018 00:21 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 16.04 - PHP development (php 7.1, MySQL 5.7, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 16.04 Dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@jay74jung
jay74jung / install.md
Created July 3, 2018 08:25 — forked from yugaego/install.md
Mac OS 10.13 High Sierra Install PHP 7.0 Apache MariaDB With Homebrew
@jay74jung
jay74jung / apache-json-log-format
Created August 3, 2018 01:57 — forked from vmadman/apache-json-log-format
An apache log format that allow access logs (but not error logs) to be output in JSON format. I found this here: http://untergeek.com/2012/10/11/getting-apache-to-output-json-for-logstash/ -- but modified it for my purposes a good bit.
# Access Logs
LogFormat "{ \
\"@vips\":[\"%v\"], \
\"@source\":\"%v%U%q\", \
\"@source_host\": \"%v\", \
\"@source_path\": \"%f\", \
\"@tags\":[\"Apache\",\"Access\"], \
\"@message\": \"%h %l %u %t \\\"%r\\\" %>s %b\", \
\"@fields\": { \
\"timestamp\": \"%{%Y-%m-%dT%H:%M:%S%z}t\", \
@jay74jung
jay74jung / docker-compose.yml
Created August 17, 2018 01:18 — forked from BretFisher/docker-compose.yml
Docker Compose local development with wildcard DNS for multi-domain development
version: '3'
# vcap.me is a wildcard domain that resolves to localhost
# in case you need to pass URL's around from browser to
# containers this could help you get around localhost problem
services:
# use www.vcap.me to access web containter from host
# use api.vcap.me to access api container from host
proxy:
@jay74jung
jay74jung / install-docker.sh
Created August 21, 2018 07:54 — forked from sheikhwaqas/install-docker.sh
Install Docker & Docker-Compose on Ubuntu 16.04 LTS (Xenial). Run this file with sudo.
# Install Pre-requisites
apt update
apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
# Install Docker CE
apt install docker-ce -y
#!/bin/sh
# POSIX
# Manual loop
die() {
printf '%s\n' "$1" >&2
exit 1
}
#!/bin/sh
# POSIX
# getopts
# Usage info
show_help() {
cat << EOF
Usage: ${0##*/} [-hv] [-f OUTFILE] [FILE]...
Do stuff with FILE and write the result to standard output. With no FILE