Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris James cajames

View GitHub Profile
@cajames
cajames / fargate-efs-cdk-stack.ts
Last active Jul 5, 2021
Sample Fargate + EFS CDK Stack. Written up here: https://caj.ms/writing/aws-fargate-with-efs
View fargate-efs-cdk-stack.ts
import cdk = require("@aws-cdk/core");
import { Vpc, Port } from "@aws-cdk/aws-ec2";
import {
Cluster,
ContainerImage,
AwsLogDriver,
FargatePlatformVersion,
NetworkMode,
CfnService,
} from "@aws-cdk/aws-ecs";
@cajames
cajames / vue.json
Last active Dec 21, 2018
VSCode Vue Single File Snippet
View vue.json
{
/*
// Place your snippets for Vue here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@cajames
cajames / promise-test.js
Last active Sep 28, 2017
Quick test to understand effect of mass amount of parallel promises in Node
View promise-test.js
async function test(max) {
const promises = [];
if (max < 1000)
throw new Error('max should be greater than 1000');
for (let a = 0; a <= max; a++) {
if (a === 0)
View .git.aliases.sh
# Git Aliases
alias gcl='git clone'
alias ga='git add'
alias grm='git rm'
alias gap='git add -p'
alias gall='git add -A'
alias gf='git fetch --all --prune'
alias gft='git fetch --all --prune --tags'
alias gfv='git fetch --all --prune --verbose'
@cajames
cajames / confluence.css
Last active May 26, 2017
Confluence Stylesheet
View confluence.css
@import url("https://fonts.googleapis.com/css?family=Muli|Open+Sans|Source+Code+Pro");
#main #content {
padding: 1em;
margin: auto;
background: #fefefe;
}
#main #content h1, #main #content h2, #main #content h3, #main #content h4, #main #content h5, #main #content h6 {
font-weight: bold;
font-family: 'Muli', sans-serif;
}
@cajames
cajames / setup_mac.sh
Last active May 20, 2021
Script to setup a new Developer Mac on Catalina
View setup_mac.sh
# Script to setup a new Mac
# Fix up the key repeat issues on MacOS Sierra. Need the key repeats for VIM!
defaults write NSGlobalDomain KeyRepeat -int 2
defaults write NSGlobalDomain InitialKeyRepeat -int 15
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
# Finder should show all .files
defaults write com.apple.finder AppleShowAllFiles YES