// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
# 1. Create service account | |
#. * Service Account Token Creator | |
#. * Artifact Registry Writer | |
# 2. Generate service account key | |
#. * In GitHub project -> Settings -> Secrets -> Actions -> New Repository Secret | |
#. Name: GCP_CREDENTIALS | |
#. Value: key.json contents | |
# 3. Create repo in artifact repository | |
#. * Name: $env.REPOSITORY below | |
#. * Region: $env.GAR_LOCATION below |
/** | |
* Author Milan Divkovic | |
* | |
* You can control the motor with following commands: | |
* 0: Disables the motor | |
* 1: Enables the motor | |
* + or -: Increase or decrease speed in respect to rotation direction | |
*/ | |
#include <Arduino.h> |
// CAN Send Example | |
// | |
#include <mcp_can.h> | |
#include <SPI.h> | |
long unsigned int rxId; | |
unsigned char len = 0; | |
unsigned char rxBuf[8]; | |
char msgString[128]; // Array to store serial string |
I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).
After assigning the new database, I had two databases attached to the application. They looked something like this:
- HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
# Redux in Ruby | |
class Store | |
attr_reader :state | |
def initialize(initial_state, *reducers) | |
@reducers = reducers | |
@state = initial_state || {} | |
end |
license: apache-2.0 |
You can use CodePipeline and CodeBuild to create a continuous deployment/integration pipeline for serverless applications build on AWS Lambda and Amazon API Gateway. This sample application is written in Go with the Gin framework and uses the eawsy API Gateway proxy shim: https://github.com/eawsy/aws-lambda-go-net
We initially detailed our methodology in this blog post: https://aws.amazon.com/blogs/compute/continuous-deployment-for-serverless-applications/
We have used the shim technology created by eawsy to run Golang applications inside AWS Lambda (https://github.com/eawsy/aws-lambda-go-shim) and created a container that can be used with CodeBuild as part of our original pipeline template.
The container is available on DockerHub and is called sapessi/aws-lambda-go18-codebuild:latest
. To use this container, simply change the Image
property of the CodeBuild project environment.
The pipeline template, sample app, buildspec and SAM files are attached to this gist.
CREATE TABLE accounts( | |
id serial PRIMARY KEY, | |
name VARCHAR(256) NOT NULL | |
); | |
CREATE TABLE entries( | |
id serial PRIMARY KEY, | |
description VARCHAR(1024) NOT NULL, | |
amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
-- Every entry is a credit to one account... |