This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* | |
Because of Helm bug (https://github.com/helm/helm/issues/3001), Helm converts | |
int value to float64 implictly, like 2748336 becomes 2.748336e+06. | |
This breaks the output even when using quote to render. | |
Use this function when you want to get the string value only. | |
It handles the case when the value is string itself as well. | |
Parameters: is string/number | |
*/}} | |
{{- define "stringOrNumber" -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Create Read-write PSQL user and DB */ | |
CREATE DATABASE yourdbname; | |
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser; | |
/* Create Read-only user for db $DB */ | |
CREATE ROLE rouser WITH LOGIN PASSWORD 'yourpass' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set-env --description "Runs the command and sets the environment variables from the output. Kinda like source, but with additional support of var=value" | |
if not set -q argv[1] | |
echo "set-env: no command specified" | |
return 1 | |
end | |
set cmd "$argv[1]" | |
eval "$cmd" | while read -l line | |
if test -z "$line" | |
continue | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: argocd-notifications-cm | |
namespace: argocd | |
data: | |
template.app-deployed: | | |
email: | |
subject: New version of an application {{.app.metadata.name}} is up and running. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Function to display help | |
display_help() { | |
echo "Usage: $0 [command] [args]" | |
echo "Command:" | |
echo " approve Approves the specified PR in format of URL" | |
echo " create Creates a new PR from specified args" | |
echo "Options:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Function to display help | |
display_help() { | |
echo "Usage: $0 [options] org repo" | |
echo "Options:" | |
echo " -d, --default-branch BRANCH Set the default branch for the repository" | |
echo " -t, --teams TEAMS Set repository access permissions for specified teams" | |
echo " -j, --rule-json JSON Set ruleset for the repository" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# syntax=docker/dockerfile:1 | |
FROM golang:1.21-alpine AS builder | |
RUN apk add --no-cache git ca-certificates | |
RUN go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest | |
RUN xcaddy build --with github.com/mholt/caddy-l4 --output /usr/bin/caddy && chmod +x /usr/bin/caddy | |
FROM alpine:3.15 | |
RUN apk add --no-cache ca-certificates mailcap | |
RUN apk add bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "TheFaker NFT minted for DCX training", | |
"external_url": "https://shivanshs9.me", | |
"image": "https://avatars.githubusercontent.com/u/8217199?v=4", | |
"name": "TheFaker", | |
"attributes": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# How to use? | |
## bash gh_migrate_init.sh competition-service | |
GITHUB_ORG="coindcx-app" | |
JIRA="IDOPS-153" | |
SOURCE_FOLDER="coindcx-api-help" | |
prepare_repo() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Assume sudo by default | |
[ $(id -u) -eq 0 ] || exec sudo $0 $@ | |
for bin in /var/lib/rancher/k3s/data/**/bin/; do | |
[ -d $bin ] && export PATH=$PATH:$bin:$bin/aux | |
done | |
set -x |
NewerOlder