Skip to content

Instantly share code, notes, and snippets.

@vietphan-ioof
vietphan-ioof / fedora_post_install.md
Created April 4, 2024 12:06 — forked from zobayer1/fedora_post_install.md
Fedora 36 post installation notes for software developers. Things you should do after installing your new Fedora 36 workstation.

Fedora 36 Post Installation (For Software Developers)

Top N things you should do after installing or upgrading to your new Fedora 36 workstation.


Settings

Change Hostname

@vietphan-ioof
vietphan-ioof / monitor_ec2_instance.py
Created April 1, 2024 12:17 — forked from si3mshady/monitor_ec2_instance.py
Setting Up CloudWatch Alarms with Boto3 to Monitor EC2 Instance Performance
import boto3
# Specify the region where the EC2 instances reside
region = 'us-east-1'
# Specify the tag key and value to filter the EC2 instances
tag_key = 'env'
tag_value = 'prod'
@vietphan-ioof
vietphan-ioof / content.md
Created July 21, 2023 05:29 — forked from Mishco/content.md
Setup HashiCorp Vault on docker

Setup HashiCorp Vault on docker

Vault secures, stores, and tightly controls access to tokens, passwords, certificates, API keys, and other secrets in modern computing. Vault is primarily used in production environments to manage secrets. Vault is a complex system that has many different pieces. There is a clear separation of components that are inside or outside of the security barrier. Only the storage backend and the HTTP API are outside, all other components are inside the barrier.

Vault_architecture

Figure 1: Architecture of Vault and Spring App (Click to enlarge)

The storage backend is untrusted and is used to durably store encrypted data. When the Vault server is started, it must be provided with a storage backend so that data is available across restarts. The HTTP API similarly must be started by the Vault server on start so that clients can interact with it.

@vietphan-ioof
vietphan-ioof / blockmetatwitter.md
Created June 26, 2023 11:56 — forked from dangovorenefekt/blockmetatwitter.md
Block Meta and Twitter (nginx)

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@vietphan-ioof
vietphan-ioof / settings.jsonc
Created May 16, 2023 00:04 — forked from hyperupcall/settings.jsonc
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
version: '3'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.0.0-SNAPSHOT
container_name: elasticsearch
environment:
- network.host=0.0.0.0
- discovery.type=single-node
- cluster.name=docker-cluster
- node.name=cluster1-node1
@vietphan-ioof
vietphan-ioof / GetAllBinaries.ps1
Created February 25, 2023 12:09 — forked from sharunkumar/GetAllBinaries.ps1
PowerShell Script to get all the binaries in the path variable, on windows
$env:Path.split(";") | ForEach-Object {
Get-ChildItem -Path $_ -ErrorAction SilentlyContinue
} | Where-Object { $env:PATHEXT.ToLower() -match $_.Extension.ToLower() } | Select-Object FullName
@vietphan-ioof
vietphan-ioof / video_to_gif.sh
Created January 11, 2023 04:21 — forked from Olshansk/video_to_gif.sh
A handy bash function to convert a video (e.g. a screen cap) to a gif using ffmpeg in your shell
function video_to_gif {
local input_video_path="$1"
local output_gif_path="$2"
local fps="${3:-10}"
local scale="${4:-1080}"
local loop="${5:-0}"
ffmpeg -i "${input_video_path}" -vf "setpts=PTS/1,fps=${fps},scale=${scale}:-2:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop $loop "${output_gif_path}"
}
@vietphan-ioof
vietphan-ioof / chatgpt_parser_md.py
Created December 4, 2022 22:39 — forked from thomasantony/chatgpt_parser_md.py
Convert saved HTML transcripts from ChatGPT to Markdown
# Save the transcripts using the "Save Page WE" Chrome Extension
# This script was generated by ChatGPT
import sys
from bs4 import BeautifulSoup
# Check if a file was provided as a command line argument
if len(sys.argv) < 2:
print("Please provide an HTML file as a command line argument.")
sys.exit(1)