Skip to content

Instantly share code, notes, and snippets.

View oscarnevarezleal's full-sized avatar

Oscar Nevarez oscarnevarezleal

View GitHub Profile
@andrewodri
andrewodri / Dockerfile
Last active July 3, 2024 21:35
Connect Fargate instance to SSM Session Manager
FROM debian:10-slim
RUN apt-get update -y && \
apt-get install -y awscli curl gnupg && \
apt-key adv --fetch-keys "https://nginx.org/keys/nginx_signing.key" && \
echo "deb http://nginx.org/packages/debian buster nginx" > /etc/apt/sources.list.d/nginx.list
RUN curl --silent --show-error --location --output /tmp/amazon-ssm-agent.deb "https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/latest/debian_amd64/amazon-ssm-agent.deb" && \
dpkg -i /tmp/amazon-ssm-agent.deb
@brettswift
brettswift / CfnInitMetadataBuilder.ts
Last active October 2, 2022 20:36
CDK 1.10.1 - ASG Cloudformation Init example
import autoscaling = require("@aws-cdk/aws-autoscaling")
import scriptAssets = require("./CfnInitScriptAsset")
import iam = require('@aws-cdk/aws-iam')
import cdk = require('@aws-cdk/core')
/**
* Helpful context into what was built.
* Use these to get logical ID's when constructing your userdata.
*/
@dabit3
dabit3 / Authexample.js
Created May 14, 2019 19:45
Example of manual sign out using React Native & AWS Amplify
import React from 'react'
import { View, Text } from 'react-native'
import { withAuthenticator } from 'aws-amplify-react-native'
function App(props) {
function signOut() {
Auth.signOut()
.then(() => {
props.onStateChange('signedOut', null);
})
@thaJeztah
thaJeztah / README.md
Last active March 25, 2025 01:50
Docker Compose as a Docker CLI plugin

Run Docker Compose as a Docker CLI plugin

Just a quick fun experiment to try to make docker-compose work as a Docker CLI plugin

To use it (assuming you have docker compose installed):

  1. download a and install nightly build of the docker cli (linux macOS)
---
Resources:
Api:
Type: 'AWS::ApiGatewayV2::Api'
Properties:
Name: !Ref 'AWS::StackName'
ProtocolType: WEBSOCKET
RouteSelectionExpression: '\$default'
DefaultRoute:
Type: 'AWS::ApiGatewayV2::Route'
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@miguelmota
miguelmota / buildspec.yml
Created May 21, 2018 22:24
Yaml spec multiline command example
version: 0.2
phases:
pre_build:
commands:
- echo ...
build:
commands:
- echo ...
- >
@Kruemelkatze
Kruemelkatze / ! Theming Ant Design with Sass and Webpack.md
Last active June 4, 2024 21:55
Theming Ant Design with Sass and Webpack

Theming Ant Design with Sass and Webpack

This is a solution on how to theme/customize Ant Design (which is written in Less) with Sass and webpack. Ant itself offers two solutions and a related article on theming, but these are only applicable if you use Less, the antd-init boilerplate or dva-cli.

What this solution offers:

  • use a single sass-file to customize (no duplicate variables for your project and Ant)
  • hot reload compatibility
  • no dependencies on outdated npm modules
  • easy integration with your existing webpack setup (webpack 3+ tested)
FROM alpine:3.7
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/community/' >> /etc/apk/repositories
ENV PYTHON_VERSION=2.7.14-r2
ENV PY_PIP_VERSION=9.0.1-r1
ENV SUPERVISOR_VERSION=3.3.1
ENV NGINX_VERSION=1.12.2-r3
RUN mkdir /www && mkdir /www/myapp/
@shortjared
shortjared / list.txt
Last active July 30, 2025 15:54
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com