Skip to content

Instantly share code, notes, and snippets.

View demsey2's full-sized avatar

Dawid Tomkalski demsey2

View GitHub Profile
@veuncent
veuncent / docker_debugging.md
Last active February 21, 2024 00:58
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@henhal
henhal / 01_setup_ssh.config
Created April 20, 2017 06:01
Transferring SSH keys to Elastic Beanstalk in order to access private gits (for npm etc)
Resources:
AWSEBAutoScalingGroup:
Metadata:
? "AWS::CloudFormation::Authentication"
:
S3Auth:
buckets:
- <my-bucket>
roleName:
? "Fn::GetOptionSetting"
@singledigit
singledigit / cognito.yaml
Last active September 20, 2025 17:27
Create a Cognito Authentication Backend via CloudFormation
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Parameters:
AuthName:
Type: String
Description: Unique Auth Name for Cognito Resources
Resources:
# Creates a role that allows Cognito to send SNS messages
SNSRole:
@NickNaso
NickNaso / app.js
Created July 5, 2017 22:12 — forked from adrai/app.js
aws-serverless-fastify
const fastify = require('fastify')();
fastify.get('/', (request, reply) => reply.send({ hello: 'world' }));
if (require.main === module) {
// called directly i.e. "node app"
fastify.listen(3000, (err) => {
if (err) console.error(err);
console.log(`server listening on ${fastify.server.address().port}`);
});
@sirodoht
sirodoht / new-db-postgres.md
Last active July 30, 2021 09:15
How to create new database and new user with password on PostgreSQL (the easiest way)

How to create new database and new user with password on PostgreSQL

First, create db:

$ createdb avocado

Then, create user:

$ createuser avocado
export class BaseEnvironment {
env: BaseEnvironment.Env
FirebaseConfig: {
apiKey: string,
authDomain: string,
databaseURL: string,
projectId: string,
storageBucket: string,
messagingSenderId: string
}
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active July 17, 2025 09:01
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@miseeger
miseeger / ESLintForVueFilesInVSCode.txt
Created October 13, 2017 19:32
ESLint for .vue files in VS Code
1) Install ESLint for VS Code (https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
2) Add the following settings to VS Code settings:
"[javascript]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
},
"[vue]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
@mkjiau
mkjiau / axios-interceptors-refresh-token.js
Last active September 20, 2025 02:01
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
@shortjared
shortjared / list.txt
Last active October 22, 2025 13:34
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