Skip to content

Instantly share code, notes, and snippets.

View cajames's full-sized avatar

Chris James cajames

View GitHub Profile
@cajames
cajames / setup_mac.sh
Last active August 14, 2023 04:01
Script to setup a new Developer Mac
# 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
@cajames
cajames / fargate-efs-cdk-stack.ts
Last active July 26, 2023 08:40
Sample Fargate + EFS CDK Stack. Written up here: https://caj.ms/writing/aws-fargate-with-efs
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 / .git.aliases.sh
Last active February 28, 2022 10:05
Git Aliases
# 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 / vue.json
Last active December 21, 2018 08:54
VSCode Vue Single File Snippet
{
/*
// 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 September 28, 2017 22:11
Quick test to understand effect of mass amount of parallel promises in Node
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)
@cajames
cajames / confluence.css
Last active May 26, 2017 06:43
Confluence Stylesheet
@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;
}