Skip to content

Instantly share code, notes, and snippets.

@riandyrn
riandyrn / self_signed_ssl_aws_alb.md
Last active May 13, 2024 07:39
Self Signed SSL Certificate for AWS Application Load Balancer

Self Signed SSL Certificate for AWS ALB

  1. Generate private key

    $> openssl genrsa 2048 > my-private-key.pem
  2. Generate certificate using private key, you will be prompted to fill some fields. Fill required fields randomly, except for Common Name fill it with *.amazonaws.com or your valid domain name

@natoinet
natoinet / lambda_ftp.py
Last active May 13, 2024 07:38
AWS Lambda in Python: Upload a new file from S3 to FTP
import os
import json
from ftplib import FTP
import boto3
# Source https://github.com/Vibish/FTP_SFTP_LAMBDA/blob/master/FTPThroughLambda.py
# https://www.edureka.co/community/17558/python-aws-boto3-how-do-i-read-files-from-s3-bucket
# https://medium.com/better-programming/transfer-file-from-ftp-server-to-a-s3-bucket-using-python-7f9e51f44e35
# https://github.com/kirankumbhar/File-Transfer-FTP-to-S3-Python/blob/master/ftp_to_s3.py
# https://dashbird.io/blog/python-aws-lambda-error-handling/
@ahmadshobirin
ahmadshobirin / set locale and timezone indonesia in laravel.md
Last active May 13, 2024 07:37
set locale and timezone indonesia in laravel

Open File App\Providers\AppServiceProvider

Change method boot

use Carbon\Carbon;


public function boot()
{
	config(['app.locale' => 'id']);
@iambryancs
iambryancs / pyenv-wsl-ubuntu_22.04.md
Created May 31, 2023 10:31
Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Using Pyenv in WSL Ubuntu 22.04 LTS to install Python 3.8

Env

  • Windows 10
  • Ubuntu 22.04 WSL
  • zsh

Requirements

  • git
@CodyReichert
CodyReichert / react-es6-flow-emacs-configuration.md
Last active May 13, 2024 07:35
Configuring Emacs for react, es6, and flow

Configuring Emacs for react, es6, and flow

For a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.

This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.

Set up web-mode

web-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.

@cpicanco
cpicanco / Monokai.xml
Last active May 13, 2024 07:31
Dark theme for Lazarus IDE. Copy to "userschemes" inside primary config path
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Lazarus>
<ColorSchemes Version="11">
<Names Count="1">
<Item1 Value="Monokai"/>
</Names>
<Globals Version="11">
<SchemeMonokai>
<ahaGutter Background="2238503"/>
@mykeels
mykeels / states-and-cities.json
Created April 8, 2018 12:43
Nigerian States and Cities in JSON
[
{
"name": "Abia",
"cities": [
"Aba South",
"Arochukwu",
"Bende",
"Ikwuano",
"Isiala Ngwa North",
"Isiala Ngwa South",
@SebaUbuntu
SebaUbuntu / README.md
Last active May 13, 2024 07:26
Generate framework compatibility matrix from fqnames

Generate framework compatibility matrix from fqnames

  • Download these 2 files
  • Compile AOSP without fcm from stock and wait for check_vintf to error out
  • Delete Python prefix from all lines (e.g. checkvintf E 06-24 00:30:22 49120 49120 check_vintf.cpp:554])
  • Paste the result in fqnames.txt
  • Launch the script