Skip to content

Instantly share code, notes, and snippets.

View coreysan's full-sized avatar

Corey Sanford coreysan

  • Sanco Software
  • Vancouver, BC
View GitHub Profile
@coreysan
coreysan / sublime-fileheader-js.tmpl
Last active October 9, 2018 21:15
A javascript template for the sublime fileHeader plugin. Place this in a directory linked from the options: custom_template_header_path
/**
* @Author: {{author}}
* @Date: {{create_time}}
*
* FILE_DESCRIPTION_OR_PURPOSE
*/
const setAssignedUsers = async () => {
const randomTeamUsers = await TeamMember.forge()
.orderRand()
.fetchAll();
return Promise.all(
randomTeamUsers.map(async teamUser => {
const fellowTeamUser = await getFellowTeamUser(teamUser);
const userCustomer = await ContactUser.forge()
@coreysan
coreysan / docker-compose.yml
Created July 4, 2018 18:14
Caddy docker-compose
# @Author: Corey Sanford <corey@hackcapital.com>
# @Date: Tuesday, 12th June 2018 5:25:12 pm
# @Email: corey@hackcapital.com
# @Last modified by: coreysan
# @Last modified time: 21st June 2018 5:25:12 pm
version: "3"
networks:
liondesk-network:
@coreysan
coreysan / docker-compose.yml
Created July 4, 2018 16:59
docker-compose for ELK + Caddy
## docker-compose for ELK + Caddy
## To use:
## 1. Change URLs to match the gitlab for your org
## 2. Change network to be your desired network name
version: "3.4"
networks:
liondesk-network:
@coreysan
coreysan / AWS Elk Stack Templates.md
Last active June 28, 2018 17:26
AWS ELK Stack Templates

Templates for starting infra development using AWS CloudFormation

<snippet>
<content><![CDATA[
(${1:argument}) => {
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>anonymous-arrow-function</tabTrigger>
<tabTrigger>arrow-function</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@coreysan
coreysan / format_mp3fiber
Created June 14, 2018 04:51
Formats mp3s filenames and moves to a dated folder
#! /usr/bin/env bash
# create a folder with the current date in VA_YYYY.MM.DD_HH:MM
date_today="$(date +'%Y.%m.%d_%H.%M')"
music_path="$HOME/Music/electro/VA_$date_today"
DEF_RM_STR="\[www\.MP3Fiber\.com\]"
DEF_RM_STR2="www\.my-free-mp3\.net "
DEF_REPLACE_STR=""
DEF_PATH="$HOME/Downloads/"
source $HOME/.shell/git-checkout-cto.sh
source $HOME/.shell/git-release.sh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/coreysanford/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
@coreysan
coreysan / iterm2-profile.json
Last active June 1, 2018 00:00
iterm profile
{
"Use Non-ASCII Font" : false,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.3333333333333333,
"Color Space" : "Calibrated",
"Blue Component" : 0.9882352941176471,
"Alpha Component" : 1,
@coreysan
coreysan / corey-agnoster.zsh-theme
Created May 31, 2018 23:19
Agnoster theme, simplified
# vim:ft=zsh ts=2 sw=2 sts=2
#
# corey-agnoster's Theme from - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# Differences from Agnoster:
# - No computer name
# - No username
# - Shows current directory only, not full path
#