Skip to content

Instantly share code, notes, and snippets.

View kgust's full-sized avatar

Kevin Gustavson kgust

  • Vanderbilt University Medical Center
  • Nashville, Tennessee USA
View GitHub Profile
@kgust
kgust / gist:5300d89bfcc2b1158dad
Last active November 27, 2018 13:52
cVim Options
" old cVimrc
" let blacklists = ["https://mail.google.com/* gi gt j k l o r x y #"]
" blacklists prefixed by '@' act as a whitelist
let blacklists = ["https://mail.google.com/*", "*://mail.google.com/*", "@https://mail.google.com/mail/*"]
let mapleader = ","
@kgust
kgust / 00 README.md
Last active August 29, 2018 20:18
All Things PlantUML

This is the best resource for PlantUML details.

Important Points

When you add the PlantUML plugin to PHPStorm, it creates a number of UML* template files that are examples that you can edit.

PlantUML can be generated by programs. E.g. php-plantumlwriter) It's even simple enough that we can write our own programs to generate PlantUML for our own use.

@kgust
kgust / docker-nginx-fastcgi.conf
Created August 15, 2018 02:18
A Nginx Configuration
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
@kgust
kgust / box.json.dist
Created August 15, 2018 02:15
Can we create a PHAR of our application using box?
{
"chmod": "0755",
"main": "app/console",
"output": "console.phar",
"directories": ["src"],
"finder": [
{
"name": "*.php",
"exclude": ["test", "tests", "Tests"],
@kgust
kgust / Caddyfile
Created August 15, 2018 02:14
Playing with Docker dynamic frontend servers
irbosx-c02q307.dhcp.mc.vanderbilt.edu:80 {
gzip
fastcgi / 127.0.0.1:9001 php {
root /app001/www/irb
index web/app_dev.php
}
}
localhost:8000 {
root /Users/gustavkd/github.com/vanderbilt/irb/web/
@kgust
kgust / benchmark.php
Created August 15, 2018 02:12
I wanted to benchmark functional PHP vs loops...
<?php
/*
PHP Benchmark
Downloaded from: http://onlinephpfunctions.com
*/
class benchmark
{
@kgust
kgust / build.xml
Created August 15, 2018 02:04
Phing Build Script (replace with bash script)
<?xml version="1.0" encoding="UTF-8"?>
<project name="DISCOVR-e" default="full-build">
<property name="basedir" value="."/>
<!-- Use this when the tools are managed by Composer in ${basedir}/vendor/bin -->
<property name="pdepend" value="${basedir}/bin/pdepend"/>
<property name="phpcpd" value="${basedir}/bin/phpcpd"/>
<property name="phpcs" value="${basedir}/bin/phpcs"/>
<property name="phpdox" value="${basedir}/bin/phpdox"/>
<property name="phploc" value="${basedir}/bin/phploc"/>
<property name="phpmd" value="${basedir}/bin/phpmd"/>

Change Dock, screen capture, and software update settings

defaults write com.apple.dock autohide-time-modifier -int 0 #1
defaults write com.apple.screencapture type jpg #png|tiff|pdf
defaults write com.apple.SoftareUpdate ScheduleFrequency -int 1 #7

Encrypt/Decrypt a file using openssl

openssl enc -aes-256-cbc -e -in  -out  #encrypt
@kgust
kgust / Docker Tips.md
Last active June 18, 2018 18:08
Docker Tips

Categories

Build

docker-compose build .
docker-compose up --detach

Spring Cleaning

@kgust
kgust / LICENSE
Last active January 23, 2018 15:11
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.