Skip to content

Instantly share code, notes, and snippets.

View giautm's full-sized avatar
😍
Nice to meet you ʕ◔ϖ◔ʔ

Giau. Tran Minh giautm

😍
Nice to meet you ʕ◔ϖ◔ʔ
View GitHub Profile
@giautm
giautm / run-container.sh
Created August 27, 2024 20:36
Generate certs for MSSQL container to bypass issue with Go 1.23
#!/bin/sh
set -e
openssl req -x509 -nodes -newkey rsa:2048 \
-subj '/CN=atlas.ariga.io' \
-days 365 \
-keyout mssql.key \
-out mssql.pem
chmod 440 mssql.pem mssql.key
@giautm
giautm / postmortem.md
Created May 10, 2023 09:39 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
package handler
type (
options struct {
MaxPayload int64
}
// HandlerOptions is a function that configures the handler.
HandlerOptions func(*options)
)
package floww
import (
"bytes"
"crypto/hmac"
"crypto/md5"
"crypto/sha256"
"encoding/hex"
"fmt"
"io"
package softdelete
import (
"context"
"entgo.io/contrib/entgql"
"entgo.io/ent"
"entgo.io/ent/entql"
"entgo.io/ent/schema/field"
"entgo.io/ent/schema/mixin"
@giautm
giautm / codespaces.zsh-theme
Created April 9, 2022 13:23 — forked from renbaoshuo/codespaces.zsh-theme
GitHub Codespaces zsh Theme
# Codespaces zsh prompt theme
__zsh_prompt() {
local prompt_username
if [ ! -z "${GITHUB_USER}" ]; then
prompt_username="@${GITHUB_USER}"
else
prompt_username="%n"
fi
PROMPT="%{$fg[green]%}${prompt_username} %(?:%{$reset_color%}➜ :%{$fg_bold[red]%}➜ )" # User/exit code arrow
PROMPT+='%{$fg_bold[blue]%}%(5~|%-1~/…/%3~|%4~)%{$reset_color%} ' # cwd
import { ConfigPlugin, withGradleProperties } from "@expo/config-plugins";
type PackagingOptionsProp = {
pickFirsts?: string[];
excludes?: string[];
merges?: string[];
doNotStrip?: string[];
};
export const withPackagingOptions: ConfigPlugin<PackagingOptionsProp> = (
const { withDangerousMod, withPlugins } = require("@expo/config-plugins");
const {
mergeContents,
} = require("@expo/config-plugins/build/utils/generateCode");
const fs = require("fs");
const path = require("path");
async function readFileAsync(path) {
return fs.promises.readFile(path, "utf8");
}
@giautm
giautm / .gitignore
Last active December 27, 2021 23:43
Generate captcha for train
*.class
/labeled-raw
/labeled-raw-verify
@giautm
giautm / branch.plugin.js
Last active October 4, 2023 14:01
Expo plugin to config react-native-branch
const {
AndroidConfig,
WarningAggregator,
withAndroidManifest,
withAppDelegate,
withDangerousMod,
withInfoPlist,
withMainActivity,
withPlugins,
} = require('@expo/config-plugins')