Skip to content

Instantly share code, notes, and snippets.

View ariel-frischer's full-sized avatar
🧐

Ariel Frischer ariel-frischer

🧐
View GitHub Profile
@ariel-frischer
ariel-frischer / .tmux.conf
Created February 1, 2022 02:00 — forked from jovianlin/.tmux.conf
~/.tmux.conf for iTerm2
###########################
# ~/.tmux.conf for iTerm2 #
# #
# by Jovian Lin #
###########################
##########
# Basics #
##########
@ariel-frischer
ariel-frischer / color.ts
Created December 7, 2020 02:26 — forked from EvAlex/color.ts
TypeScript Color class, useful to manipulate rgba components and convert to rga/rgba/hex
export const RGB_COLOR_REGEX = /\((\d+),\s*(\d+),\s*(\d+)(,\s*(\d*.\d*))?\)/;
export class Color {
public r: number;
public g: number;
public b: number;
public a: number;
constructor()
constructor(colorStr?: string)
sudo yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel -y
mkdir ~/ffmpeg_sources
# nasm
cd ~/ffmpeg_sources
curl -O -L https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2
tar xjvf nasm-2.14.02.tar.bz2
cd nasm-2.14.02
./autogen.sh
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
@ariel-frischer
ariel-frischer / getPixiContainer.ts
Last active July 17, 2020 01:38 — forked from only-cliches/pixibackground.js
PixiJS Background Cover & Background Container Typescript
export enum PIXI_CONTAINER_TYPE {
COVER,
CONTAIN,
}
export function getPixiContainer(bgSize: PIXI.Point, inputSprite: PIXI.Sprite, type: PIXI_CONTAINER_TYPE, forceSize?: PIXI.Point) {
let sprite = inputSprite;
let bgContainer = new PIXI.Container();
let mask = new PIXI.Graphics().beginFill(0x8bc5ff).drawRect(0, 0, bgSize.x, bgSize.y).endFill();
bgContainer.mask = mask;
bgContainer.addChild(mask);

AWS Fargate Docker Simple Deployment Setup with SSL termination

How to:

  • create a Docker-based AWS Fargate/ECS deployment
  • without the Docker containers having a public IP
  • with an Application Load Balancer as reverse proxy / SSL termination proxy sitting in front of the containers

For Fargate/ECS to be able to access your Docker images hosted on ECR (or somewhere else) you'll have to allow outbound internet access to the Fargate subnets. Here's how you do it.

@ariel-frischer
ariel-frischer / .gitlab-ci.yml
Created April 10, 2020 17:44 — forked from Mazuh/.gitlab-ci.yml
Example of gitlab CI/CD for a create-react-app application on Amazon S3 Bucket.
image: nikolaik/python-nodejs:latest
stages:
- install
- test
- deploy
prodInstall:
stage: install
script:
@ariel-frischer
ariel-frischer / py-logger-template.py
Last active October 23, 2019 23:20 — forked from gongzhitaao/py-logger-template.py
Python logging template
import logging
import logging.config
from datetime import datetime
from pathlib import Path
import sys
BASE_DIR = Path()
LOGFILE = BASE_DIR / 'bin' / (datetime.now().strftime("%H-%M") + '.log')
DEFAULT_LOGGING = {