Skip to content

Instantly share code, notes, and snippets.

Avatar
😍
Nice to meet you

Giau. Tran Minh giautm

😍
Nice to meet you
View GitHub Profile
View softdelete.go
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 Apr 9, 2022 — forked from renbaoshuo/codespaces.zsh-theme
GitHub Codespaces zsh Theme
View 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
View withPackagingOptions.ts
import { ConfigPlugin, withGradleProperties } from "@expo/config-plugins";
type PackagingOptionsProp = {
pickFirsts?: string[];
excludes?: string[];
merges?: string[];
doNotStrip?: string[];
};
export const withPackagingOptions: ConfigPlugin<PackagingOptionsProp> = (
View rnf-disable-ad-id-support.plugin.js
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 Dec 27, 2021
Generate captcha for train
View .gitignore
*.class
/labeled-raw
/labeled-raw-verify
@giautm
giautm / branch.plugin.js
Last active Jun 24, 2022
Expo plugin to config react-native-branch
View branch.plugin.js
const {
AndroidConfig,
WarningAggregator,
withAndroidManifest,
withAppDelegate,
withDangerousMod,
withInfoPlist,
withMainActivity,
withPlugins,
} = require('@expo/config-plugins')
View CodeToUUID.go
package main
import (
"fmt"
"crypto/md5"
"github.com/google/uuid"
)
func CodeToUUID(code string) uuid.UUID {
@giautm
giautm / jira_oauth.go
Created Oct 27, 2021 — forked from Lupus/jira_oauth.go
Example of using OAuth authentication with JIRA in Go
View jira_oauth.go
package main
import (
"context"
"crypto/rsa"
"crypto/x509"
"encoding/json"
"encoding/pem"
"fmt"
"log"
@giautm
giautm / vscode-remote-ssh-root.sh
Created Jul 31, 2021 — forked from arashilmg/vscode-remote-ssh-root.sh
workaround hack to open vscode remote as root without logging in as root
View vscode-remote-ssh-root.sh
# Add sudo to node runner
sed -i "/node/s/^/sudo /" ~/.vscode-server/bin/*/server.sh
# Restart remote vscode
pkill -f vscode
View gist:468ff472fc9dabb8151520cf0a5baf3f
### Keybase proof
I hereby claim:
* I am giautm on github.
* I am giautm (https://keybase.io/giautm) on keybase.
* I have a public key ASA0zR-54poGym5RYb0Z5RUovY_20zg-kdvD-cHzmmI5qQo
To claim this, I am signing this object: