https://github.com/stars/valarpirai/lists/system-design
https://github.com/tssovi/grokking-the-object-oriented-design-interview
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis. | |
## Core Principles | |
1. EXPLORATION OVER CONCLUSION | |
- Never rush to conclusions | |
- Keep exploring until a solution emerges naturally from the evidence | |
- If uncertain, continue reasoning indefinitely | |
- Question every assumption and inference |
# ----------------------------------------------------------------------------- | |
# AI-powered Git Commit Function | |
# Copy paste this gist into your ~/.bashrc or ~/.zshrc to gain the `gcm` command. It: | |
# 1) gets the current staged changed diff | |
# 2) sends them to an LLM to write the git commit message | |
# 3) allows you to easily accept, edit, regenerate, cancel | |
# But - just read and edit the code however you like | |
# the `llm` CLI util is awesome, can get it here: https://llm.datasette.io/en/stable/ | |
gcm() { |
module AppConfig | |
def self._config | |
@_config ||= ErbYaml.load_file("#{Rails.root}/config/app_configuration.yml") | |
end | |
def self.env | |
_config["env_name"] | |
end | |
end |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
<IfModule log_config_module> | |
<IfModule logio_module> | |
# You need to enable mod_logio.c to use %I and %O | |
CustomLog logs/ssl_request_log "%h %t %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %>s %D %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{X-Forwarded-For}i\" %I %O" | |
</IfModule> | |
</IfModule> |
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "pull() | |
{ | |
echo '--------- $(pwd)' | |
if [ -d \".git\" ]; then | |
echo '######### Start git pull' | |
git pull | |
else | |
echo '********* Not a git Repo **********' | |
fi | |
} |
#!/usr/bin/env python | |
import os | |
import sys | |
import boto3 | |
from datetime import datetime, timezone | |
from urllib.request import pathname2url | |
import mimetypes | |
# upload_dir_s3.py /path/to/local/folder thebucketname /path/to/s3/folder |
// FIRST METHOD | |
// Count using array | |
arr = new Array(26).fill(0); | |
s = "ABCAZZ" // Input String | |
for (var i = 0; i < s.length; i++) { | |
var index = s.charCodeAt(i) - 'A'.charCodeAt(0); | |
arr[index] += 1; | |
} |
Last updated March 13, 2024
This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.
Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.