This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first stage builds vue | |
FROM mhart/alpine-node:12 as build-stage | |
WORKDIR /app | |
COPY . . | |
RUN npm ci | |
RUN npm run build | |
# second stage copies only the static dist files to nginx html dir | |
FROM nginx:stable-alpine as production-stage | |
VOLUME /var/log/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
url="https://java-appdynamics.domain.com/" | |
for ((i=1;i<=50;i++)); do | |
curl -k ${url} | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first stage builds typescript | |
FROM mhart/alpine-node:12 AS build | |
WORKDIR /app | |
COPY . . | |
RUN npm ci | |
RUN npm run build | |
# second stage creates slim down packages | |
FROM mhart/alpine-node:12 AS cull | |
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 8080; | |
location / { | |
root /usr/share/nginx/html; | |
try_files $uri $uri/ /index.html; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://medium.com/@caulfieldOwen/youre-missing-out-on-a-better-mac-terminal-experience-d73647abf6d7 | |
# install homebrew | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# install iterm2 | |
brew cask install iterm2 | |
# install zsh | |
brew install zsh zsh-completions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this gist will use the schema and the val of a property to determine if we should normalize the incoming reference | |
Type = mongoose.model(resource._type) | |
# normalize references, since this seems to be broken... | |
for prop, val of resource | |
if Type.schema.path(prop)?.options?.ref | |
if utils.type(val) is 'object' then resource[prop] = val._id else resource[prop] = val | |
else if Type.schema.path(prop)?.options?.type?[0]?.ref | |
newArray = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logger = require 'logger' | |
log = logger.create() | |
log('START :: Starting a fun job!') | |
log('Some event happened and I have attached data.', data) | |
logs = log('END :: A fun job is over!') | |
console.log(logs) | |
# | |
# output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 1. Put this file in {app}/scripts directory | |
# 2. Deploy on to Heroku | |
# 3. Add the Heroku Scheduler add-on | |
# 4. Add Job with task $ coffee scripts/example.coffee | |
# | |
console.log 'hello world' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Server config (based on tenant config) | |
# | |
# load the config from root of project | |
config = require __dirname + '/../../config.json' | |
# | |
# Apply defaults to every tenant up front to make things easier later. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.AppCtrl = ($scope, $route, $timeout) -> | |
# mixins | |
mixin_generic($scope) # setup $scope.generic() | |
# now we can... | |
$scope.generic() | |
NewerOlder