Skip to content

Instantly share code, notes, and snippets.

View stuart-haas's full-sized avatar

Stuart Haas stuart-haas

  • @Scope-Dev-Team
  • United States
View GitHub Profile
@kutzhanov
kutzhanov / .gitlab-ci.yml
Last active November 22, 2022 20:50
Deploy Docker container into AWS ECS Fargate using Gitlab CI
image: docker:19.03
variables:
REPOSITORY_URL: <AWS_ACCOUNT_ID>.dkr.ecr.<REGION_NAME>.amazonaws.com/<ECR_REPOSITORY_NAME>
REGION: <REGION_NAME>
TASK_DEFINITION_NAME: <TASK_DEFINITION_NAME>
CLUSTER_NAME: <CLUSTER_NAME>
SERVICE_NAME: <SERVICE_NAME>
CPU: <CPU>
MEMORY: <MEMORY>
@jeffsheets
jeffsheets / .env.development
Last active May 25, 2023 05:50
JS to read AWS SSM variables for use in Gitlab CI process
#This is used locally by Create-React-App during development
#Cognito Region
REACT_APP_REGION=us-east-1
REACT_APP_USER_POOL_ID=us-east-1_youruserpoolid
REACT_APP_APP_CLIENT_ID=yourcognitoappclientidgoeshere
@dustinleblanc
dustinleblanc / lando.yml
Created May 3, 2019 18:04
Browsersync Lando
proxy:
mannequin:
- appname-styleguide.lndo.site
node:
- appname-bs.lndo.site:3000
services:
mannequin:
type: compose
services:
image: php:7.3
@jukkatupamaki
jukkatupamaki / 20190417131115_test-setup.ts
Last active June 21, 2023 07:03
How to use Knex.js in a TypeScript project
import { Knex } from 'knex'
export async function up(knex: Knex): Promise<any> {
await knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => {
table.integer('foobar');
});
}
export async function down(knex: Knex): Promise<any> {
await knex.schema.dropTable('test_setup');
@Arefu
Arefu / Install.md
Last active April 30, 2024 01:04
Install XNA On VS2019

Step One

Read this

Step Two

Put this instead.

<Installation InstalledByMsi="false">
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.VSWinDesktopExpress" />
    <InstallationTarget Version="[12.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
 
@superjose
superjose / .gitlab-ci.yml
Last active February 19, 2024 10:22
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@cedricium
cedricium / deploying.md
Created February 27, 2018 07:31
How to Deploy `codyseibert/tab-tracker` (Vue / Express Fullstack Web App)

How to Deploy tab-tracker

Heroku:

Prerequisites:

The following will need to be known / obtained before getting started:

  • Node.js and npm
  • command-line (cli) / terminal
  • Heroku account
  • Heroku CLI installed and setup with your Heroku account
@ryanhamley
ryanhamley / use-svg-as-icon-image-mapboxgl.js
Last active May 12, 2024 03:35
This gist shows how to use an <svg> element as an icon-image for a Mapbox GL symbol layer
// How to add an SVG as a symbol layer's icon image: https://github.com/mapbox/mapbox-gl-js/issues/5529#issuecomment-340011876
// Also see here: https://stackoverflow.com/a/11765731/2748013 (we need the data url stuff for the image src)
// NOTE: Importing SVGs requires an inline module loader such as https://github.com/webpack-contrib/svg-inline-loader
import template from './templates/marker.svg';
const width = 20;
const height = 40;
const img = new Image(width, height);
// map is your Mapbox GL map object
@olehmelnyk
olehmelnyk / pantone.js
Created December 30, 2017 17:44
get HEX/RGB/CMYK by Pantone code (parse official Pantone website search result)
// get HEX/RGB/CMYK by Pantone code (parse official Pantone website search result)
async function pantone(pantoneCode){
pantoneCode = pantoneCode // validate input:
.trim()
.replace(/^PANTONE /i, '') // we don't need 'PANTONE ' here
.replace(/ /g, '-'); // no spaces
return fetch(`https://www.pantone.com/color-finder/${pantoneCode}`)
.then(response => response.text())
.then(doc => new DOMParser().parseFromString(doc, 'text/html'))
@m8r1x
m8r1x / .gitlab-ci.yml
Created December 11, 2017 20:01 — forked from abdullah353/.gitlab-ci.yml
Basic skeleton of Gitlab CI integration with AWS Lambda for auto deployments.
image: docker:latest
before_script:
- apt-get update -y # Updating the Ubuntu Docker instance.
- python -V # Print out python version for debugging.
- apt install -y zip jq
- pip install awscli --upgrade --user
- export PATH=~/.local/bin:$PATH # Required for awscli.
- aws --version # Print out aws cli version for debugging.