Skip to content

Instantly share code, notes, and snippets.

Lucas Klaassen lucasklaassen

Block or report user

Report or block lucasklaassen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybindings.json
[
{
"key": "ctrl+space",
"command": "workbench.action.terminal.toggleTerminal"
},
{
"key": "ctrl+space",
"command": "workbench.action.terminal.focus",
"when": "!terminalFocus"
},
@lucasklaassen
lucasklaassen / encryption.js
Created Sep 12, 2018
Encrypt/Decrypt Angular 6 Secrets Committed To Source Control
View encryption.js
// You must create a folder in your root directory named environments/
// Add the following lines to your .gitignore
// /src/environments/environment.ts
// /src/environments/*.development.ts
// /src/environments/*.production.ts
// /src/environments/*.staging.ts
// Under src/environments add your environment.ts files like you normally do.
@lucasklaassen
lucasklaassen / fetch.js
Created Mar 3, 2018
Serverless lambda function which uses middleware to handle warmup, validation, JSON Parsing and error handling.
View fetch.js
'use strict';
import ExampleObject from './../objects/ExampleObject';
const schema = {
"properties": {
"primaryID": {
"type": "string",
"format": "uuid"
}
@lucasklaassen
lucasklaassen / handler.js
Created Mar 3, 2018
Serverless lambda function which handles validation, JSON parsing of request and error handling.
View handler.js
'use strict';
import utilities from './../lib/utilities';
import ExampleObject from './../objects/ExampleObject';
import Ajv from 'ajv';
const schema = {
"properties": {
"primaryID": {
"type": "string",
@lucasklaassen
lucasklaassen / launch.json
Created Dec 17, 2017
serverless debugging in vscode
View launch.json
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Serverless",
"program": "${workspaceFolder}/node_modules/.bin/sls",
"cwd": "${workspaceFolder}",
"args": [
@lucasklaassen
lucasklaassen / webpack.config.js
Created Dec 17, 2017
serverless-webpack configuration for debugging
View webpack.config.js
const nodeExternals = require('webpack-node-externals');
const path = require('path');
const slsw = require('serverless-webpack');
module.exports = {
devtool: 'source-map',
entry: slsw.lib.entries,
target: 'node',
externals: [nodeExternals()],
output: {
You can’t perform that action at this time.