Skip to content

Instantly share code, notes, and snippets.

# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / .bash_profile
Created January 7, 2017 17:43 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / 1-server.md
Created November 25, 2016 23:27 — forked from dragonjet/1-server.md
Setup Web Server on EC2 Amazon Linux AMI

Step 1: Server Credentials

This assumes you are now connected to the server via SSH.

  • sudo -s Enter root mode for admin access
  • groupadd devgroup Create new group to be later granted access to /var/www/html

Creating a new Root User

  • useradd -G root,devgroup masterdev Create new root user. Also add to the devgroup
  • passwd masterdev Change password for the new root user
  • At this point, you'll need to input your new root user's new password
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / nginx.default.conf
Created November 25, 2016 23:26 — forked from sumardi/nginx.default.conf
Install PHP-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php-fpm
# Install PHP extensions
sudo yum install -y php-devel php-mysql php-pdo \
php-pear php-mbstring php-cli php-odbc \
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / Ratpack.groovy
Created October 21, 2016 20:09 — forked from rhart/Ratpack.groovy
Ratpack HTTP Proxy
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import ratpack.handling.Context
import ratpack.handling.Handler
import ratpack.http.client.HttpClient
import ratpack.http.client.StreamedResponse
import ratpack.http.MutableHeaders
import ratpack.http.client.RequestSpec
import static ratpack.groovy.Groovy.ratpack
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / web.config
Created October 7, 2016 01:46 — forked from tkarpinski/web.config
webconfig for http to https redirect
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / 00. tutorial.md
Created June 20, 2016 21:12 — forked from maxivak/00. tutorial.md
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
@LCHCAPITALHUMAIN
LCHCAPITALHUMAIN / excel.groovy
Created May 19, 2016 10:46 — forked from timyates/excel.groovy
Create a styled Excel spreadsheet with Groovy and Apache POI
@Grab( 'org.apache.poi:poi:3.9' )
import static org.apache.poi.ss.usermodel.CellStyle.*
import static org.apache.poi.ss.usermodel.IndexedColors.*
import org.apache.poi.hssf.usermodel.HSSFWorkbook
new HSSFWorkbook().with { workbook ->
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color ->
createCellStyle().with { style ->
fillForegroundColor = color.index
fillPattern = SOLID_FOREGROUND
package org.eiji
@Grapes([
@Grab(group='org.slf4j', module='slf4j-log4j12', version='1.6.6'),
@Grab(group='ch.qos.logback', module='logback-classic', version='0.9.28')
]
)
import org.slf4j.Logger
import org.slf4j.LoggerFactory
/*
Copyright 2011 Martin Hawksey
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software