Skip to content

Instantly share code, notes, and snippets.

View paveljurca's full-sized avatar
🎯
Focusing

Pavel paveljurca

🎯
Focusing
View GitHub Profile
@duluca
duluca / awc-ecs-access-to-aws-efs.md
Last active February 5, 2025 13:59
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@CitizenOfRome
CitizenOfRome / easy_git_and_ssh_based_deployer.sh
Last active November 28, 2017 08:03
Easily deploy to your server via SSH and GIT with a single BASH file
#!/bin/bash
cd "`dirname $0`"
# The commit/deployment message
MESSAGE='Uh...'
[ -n "${1}" ] && MESSAGE=${1}
# ----- Part 1 - Prep the source/main repo -----
@shshaw
shshaw / index.html
Last active August 30, 2017 19:06
JPNG.svg (Transparent PNG with JPEG Compression)
<header class="container">
<div class="logo">
<h1 class="logo__heading">
<img class="logo__image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/39255/jpng-logo.png" alt="JPNG.svg" />
</h1>
<small class="logo__subtitle"><em>This logo was originally 300kb, but compressed down to 69kb using the tool below.</em></small>
</div>
@shshaw
shshaw / index.html
Last active July 10, 2017 17:53
SVG encoded for background-image
<div class="svg-bg">
<label>
<span class="svg-bg__label">Your SVG: <small>(Type or upload)</small> <div class="svg-bg__button" is="file-upload" v-on:load="loaded">Upload SVG</div></span>
<textarea class="svg-bg__input" ref="input" v-model="input">
</textarea>
</label>
<span class="svg-bg__label">background-image for CSS:
<button class="svg-bg__button" v-on:click="copy">Copy Output</button></span>
@shshaw
shshaw / css-only-sliding-panels-using-transforms.markdown
Created July 6, 2017 19:09
CSS-only Sliding Panels using transforms

CSS-only Sliding Panels using transforms

Sliding panels around to give greater emphasis to the active panel. Uses only CSS :hover states with transform/opacity transitions for maximum performance.

Responsively switches to a stacked layout on smaller screens, or by using the .panels--stacked class

A Pen by Shaw on CodePen.

License.

@shshaw
shshaw / css-only-fade-siblings-on-hover.markdown
Last active July 10, 2017 17:49
CSS-only Fade Siblings on Hover

CSS-only Fade Siblings on Hover

Fade out all siblings when an item is hovered, using only CSS

A Pen by Shaw on CodePen.

License.

@nathansmith
nathansmith / npm.bat
Last active July 18, 2017 15:15
Force specific NPM version to be used, in a locked-down Windows environment.
@echo npm.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
@echo off
"c:\program files\nodejs\X.X.X\node" --max_old_space_size=4096 "c:\program files\nodejs\X.X.X\node_modules\npm\bin\npm-cli.js" %1 %2 %3 %4 %5 %6 %7 %8 %9
@echo
'use strict'
const test = foo => {
switch (foo) {
case 'ok':
return console.log('this is fine')
/* istanbul ignore next */
default:
throw new Error('nope')
{
"0": {
"link": "https:\/\/www.facebook.com\/Cavanbah\/",
"id": "128923005880",
"name": "Byron Bay",
"location": {
"city": "Byron Bay",
"country": "Australia",
"latitude": -28.642760546087,
@nathansmith
nathansmith / sort_by_key.js
Last active June 19, 2017 14:43
Helper function to sort keys in an object.
/*
This method will take an object like this:
```
{
d: '',
b: '',
c: '',
a: ''
}