Skip to content

Instantly share code, notes, and snippets.

View marklkelly's full-sized avatar

Mark Kelly marklkelly

View GitHub Profile
@marklkelly
marklkelly / BS_QUANTA
Last active December 29, 2015 14:39
BoxStarter Machine Config
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
# Essentials
cinst IIS-WebServerRole -source windowsfeatures
cinst ASPNET -source webpi
cinst NetFx3 -source windowsfeatures
cinst PowerShell
cinst VisualStudio2012ProfessionalWebTools
cinst DotNet4.5.1
cinst aspnetmvc4.install
@marklkelly
marklkelly / epi-presales-dev
Last active December 29, 2015 17:39
EPi Presales Dev Environment
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst IIS-WebServerRole -source windowsfeatures
cinst ASPNET -source webpi
cinst NetFx3 -source windowsfeatures
cinst DotNet4.5.1
cinst aspnetmvc4.install
cinst VisualStudio2013Professional
cinst MsSqlServer2012ExpressAdv
cinst GoogleChrome
@marklkelly
marklkelly / BS_QUANTA_2012
Last active December 29, 2015 18:39
BoxStarter Quanta Environment Pre-requisites (and nice-to-haves) - Windows Server 2012 Needs a recently updated version of 2012
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Import-Module ServerManager
Add-WindowsFeature Web-Server
Add-WindowsFeature Web-Static-Content
Add-WindowsFeature NET-Framework-45-Core
Add-WindowsFeature NET-WCF-HTTP-Activation45
Add-WindowsFeature Web-Asp-Net
Add-WindowsFeature Web-Asp-Net45
Add-WindowsFeature Web-Net-Ext
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst IIS-ApplicationDevelopment -source windowsfeatures
cinst IIS-WebServer -source windowsfeatures
cinst IIS-ASPNET -source windowsfeatures
cinst IIS-ASPNET45 -source windowsfeatures
cinst IIS-CommonHttpFeatures -source windowsfeatures
cinst aspnetmvc4.install
cinst TelnetClient -source windowsFeatures
cinst VisualStudio2013Professional -InstallArguments "WebTools"
@marklkelly
marklkelly / nginx
Last active August 29, 2015 14:07
/etc/init.d/nginx
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /etc/nginx/nginx.conf
# config: /etc/sysconfig/nginx
@marklkelly
marklkelly / apex-redirect.conf
Last active September 17, 2015 16:51
Nginx - generic TLS & non-TLS apex/naked domain redirect configuration.
#Stripped down for illustrative purposes.
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#!/bin/bash
set -o errexit
clear
# Set versions. Check http://openresty.org for latest version and bundled version of nginx.
OPENRESTY_VERSION=1.9.3.1
NGINX_VERSION=1.9.3
OPENSSL_VERSION=1.0.2d
LUANGINX_VERSION=0.9.16
#!/bin/bash
set -o errexit
clear
# Set versions. Check http://openresty.org for latest version and bundled version of nginx.
OPENRESTY_VERSION=1.9.3.1
NGINX_VERSION=1.9.3
OPENSSL_VERSION=1.0.2d
# Install some pre-requisites
@marklkelly
marklkelly / nginx
Last active February 15, 2019 13:54
OpenResty init script.
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemin
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /usr/local/nginx/logs/nginx.pid
-- Setup Redis connection
local redis = require "resty.redis"
local red = redis:new()
local ok, err = red:connect("127.0.0.1", "6379")
if not ok then
ngx.log(ngx.INFO, "REDIS: Failed to connect to redis: " .. err)
return ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR)
end