Skip to content

Instantly share code, notes, and snippets.

View bay007's full-sized avatar
🏠
Working from home

egalicia bay007

🏠
Working from home
View GitHub Profile
@mafalt
mafalt / app.module.ts
Created July 9, 2022 18:42
NestJS + TypeORM configuration
import { Module } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { TypeOrmModule } from '@nestjs/typeorm';
import { getTypeOrmModuleOptions } from './config/orm.config';
import { CoreModule } from './core/core.module';
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
@nathanl
nathanl / jeg_stateful_web_applications.md
Last active October 31, 2019 16:48
James Edward Gray II describing the ability to build *stateful* web application in Elixir

James Edward Gray II

Quote from Elixir Mix 63 - "063: Designing Elixir Systems With OTP with Bruce Tate and James Gray", starting at 01:03:13

"I've worked at a bunch of companies building web apps for a long time, and I keep seeing this same pattern, and it haunts me. In the web world, all we want is these long interactions with people, and we live in this stateless world. So what we do is, the first part of every request, we do thirty queries to re-establish the state of the world that we just forgot a few seconds ago after the last request. And then we go forward and make one tiny step forward, and then we forget everything again, so that when the next request comes in we can do thirty queries to put it all back and make one more tiny step. And I kept thinking, "there has to be a better way than this, right?"

And if you look at web advancements over the years, most of the things we're doing are

@ozgurakan
ozgurakan / lambda_assume_role.py
Last active January 12, 2023 08:55
Assume Role within A Lambda function (Python)
import boto3
# you can assign role in the function like below
# ROLE_ARN = 'arn:aws:iam::01234567890:role/my_role'
#
# or you can pass role as an evironment varibale
# ROLE_ARN = os.environ['role_arn']
ROLE_ARN = = os.environ['role_arn']
@rmhrisk
rmhrisk / Progressive Web Applications, Isomorphic Javascript and Web Crypto.md
Last active June 3, 2020 08:41
Progressive Web Applications, Isomorphic Javascript and Web Crypto

A Progressive Web Appplication uses modern web capabilities to deliver an app-like user experience, these applications are sometimes built as isomorphic web applications. In these cases, much of the code that runs on the client also runs the server.

This combination of approaches and the various technologies that make them possible are being used to build a new class of web applications that can often come together quicker and in many cases are indistinguishable from native applications.

So much so, thanks to Electron, you can often wrap these web applications as "native applications". These web-native applications look great too, if you use Slack or Visual Studio Code you know what I am talking about.

I believe Web Crypto is a great addition to this toolchain. With the Web Crypto these applications can incorporate strong,

@moshest
moshest / appspec.yml
Last active October 13, 2021 18:09
Node.js Project on AWS CodeDeploy CentOS
version: 0.0
os: linux
files:
- source: /
destination: /home/ec2-user/node
permissions:
- object: /home/ec2-user
owner: ec2-user
group: ec2-user
type:
@hatarist
hatarist / ensure_csrf_cookie_mixin.py
Created July 16, 2015 15:37
EnsureCsrfCookieMixin for Django's Class-Based Views
@jvorcak
jvorcak / killgunicorn.sh
Last active July 12, 2021 06:27
Kill gunicorn with all of the workers
alias killgunicorn="ps aux | grep gunicorn | awk '{print $2;}' | xargs kill -9 2>/dev/null"