Skip to content

Instantly share code, notes, and snippets.

@ShawInnes
ShawInnes / docker-compose.yml
Created January 17, 2019 13:23
Logging to Seq from Docker Environment Variables
version: '3'
services:
seq:
image: datalust/seq:latest
ports:
- '80:80'
- '5341:5341'
environment:
ACCEPT_EULA: Y
create-nx-workspace resume-format --yarn --npm-scope=resume-format --style scss
ng generate app consultant-ui --routing --directory '' --tags '' --unit-test-runner jest --e2e-test-runner cypress
ng generate lib shared-components --directory '' --tags '' --unit-test-runner jest --e2e-test-runner cypress --lazy false --module true --parent-module ''
ng g c resume-upload --export=true --project=shared-components
@ShawInnes
ShawInnes / quickstart.sh
Created January 10, 2019 11:35
Angular 7 Quick Start
ng add ngx-bootstrap
ng add primeng
ng add primeicons
yarn upgrade -L
@ShawInnes
ShawInnes / gratitude_conversation_starters.json
Created January 1, 2019 10:20
Gratitude Conversation Starters
[
"What do you love about your home?",
"Describe a hobby or activity that makes you happy",
"Describe one thing you're really good at",
"Who would you like to thank?",
"What is something that you might take for granted that you are grateful for?",
"Describe something you do every day that you're grateful for",
"Name a taste or flavour that makes you happy",
"What do you love about winter?",
"What do you love about summer?",
@ShawInnes
ShawInnes / setup.sh
Last active January 31, 2023 09:57
New Mac Setup
#!/bin/sh
touch ~/.zprofile
COMPNAME="Titan"
sudo scutil --set ComputerName "$COMPNAME"
sudo scutil --set HostName "$COMPNAME"
sudo scutil --set LocalHostName "$COMPNAME"
sudo defaults write /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName -string "$COMPNAME"
@ShawInnes
ShawInnes / query_gnaf.sql
Created August 8, 2017 12:53
Query the GNAF database
select *
from gnaf_201705."addresses"
where "street_name" = 'ANN'
and "street_type" = 'STREET'
and "locality_name" = 'BRISBANE CITY'
limit 10
select *
from gnaf_201705."localities"
where "locality_name" = 'STAFFORD'
@ShawInnes
ShawInnes / opencv3_python3.sh
Last active June 17, 2017 08:40
Install openCV3 with Python3 on OSX
#!/bin/sh
## need to make sure current python version is 3.6.1 also
pip install numpy
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/devops/opencv_contrib/modules \
-D PYTHON3_LIBRARY=/usr/local/opt/python3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/config-3.6m-darwin/libpython3.6.dylib \
@ShawInnes
ShawInnes / Ng2-Auth0.md
Created May 23, 2017 10:25
Angular2 and Auth0 with API

app.component.ts

import { provideAuth, AuthHttp, AuthConfig } from 'angular2-jwt';

export function authHttpServiceFactory(http: Http, options: RequestOptions) {
  return new AuthHttp( new AuthConfig({}), http, options);
}
@NgModule({
  declarations: [
@ShawInnes
ShawInnes / DevSetup.ps1
Last active December 27, 2016 23:37
Set up new Server 2016 Dev PC
## using Choco
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco feature enable -n=allowGlobalConfirmation
# On Win10 and Server2016 you don't need to install chocolatey
Install-PackageProvider chocolatey -ForceBootstrap -Force
# Dev Tools
Install-Package vcredist2012 -Force