Skip to content

Instantly share code, notes, and snippets.

View keymastervn's full-sized avatar
🥐
salted egg yolk croissant

Dat Le-Tien keymastervn

🥐
salted egg yolk croissant
  • Employment Hero
  • HCMC, Vietnam
  • 07:55 (UTC +07:00)
View GitHub Profile
@nvh0412
nvh0412 / benchmark.rb
Created March 27, 2021 08:05
Benchmark mini_mime vs marcel
require 'marcel'
require 'memory_profiler'
require 'benchmark/ips'
puts "Memory stats for requiring mini_mime"
result = MemoryProfiler.report do
require 'mini_mime'
end
puts "Total allocated: #{result.total_allocated_memsize} bytes (#{result.total_allocated} objects)"
@adamrdavid
adamrdavid / db_guidelines.md
Last active July 14, 2023 13:03
the darndest things
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 17, 2025 09:00
set -e, -u, -o, -x pipefail explanation
@alexamies
alexamies / README.md
Last active February 2, 2021 10:35
Using NGINX with Brotli

Using NGINX with Brotli

This Gist demonstrates enabling Brotli in Nginx in App Engine Flex using a custom container.

Running in Docker locally

Use of basic Nginx image adapting the example nginx.conf adapted from Full Example Configuration

docker run --rm -itd --name test-nginx \
  -v $(pwd):/usr/share/nginx/html:ro \
@BrianWill
BrianWill / tech_writing.md
Last active October 6, 2024 06:44
Rules for technical communication

The 4 C's of good technical communication:

concise

Concision not only saves the audience time, it cuts out distracting verbiage and helps avoid burying key information in a sea of boiler plate.

Audiences very often revisit sources, and concision makes it easier to relocate particular bits of information.

Smaller pieces are easier to rearrange, and so in practice, the more concise, the more authors are likely to work out an ideal structure.

@ibraheem4
ibraheem4 / postgres-brew.md
Last active February 11, 2025 10:40 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@cdesch
cdesch / rails_generator_cheat_sheet.md
Last active April 4, 2025 13:13
Rails Generator CheatSheet

Cheat Sheets are greate but they are not a substitute for learning the framework and reading the documentation as we most certainly have not covered every potential example here. Please refer to the Rails Command Line Docs for more information.

Command Line Generator Info

Reference

You can get all of this information on the command line.

rails generate with no generator name will output a list of all available generators and some information about global options. rails generate GENERATOR --help will list the options that can be passed to the specified generator.

begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
@wbotelhos
wbotelhos / clear-sidekiq-jobs.sh
Last active April 9, 2025 12:42
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?