// in module
forwardRef(() => OrganisationModule)
// in service
@Inject(forwardRef(() => OrganisationService))
private readonly organisationService: OrganisationService,
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
import boto3 | |
import mysql.connector | |
from sendgrid.helpers.mail import Mail, Email, To, Content | |
from sendgrid import SendGridAPIClient | |
import certifi | |
import string | |
import random | |
import os | |
from urllib3 import disable_warnings, exceptions |
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 printQueryBuilderSql(query: SelectQueryBuilder<any>) { | |
const sql = query.getSql(); | |
const parameters = query.getParameters(); | |
console.log("SQL:", sql); | |
console.log("Parameters:", parameters); | |
} | |
printQueryBuilderSql(query); |
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
Include ~/.ssh/fixed/fixed-config | |
https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/ |
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 | |
# Prompt the user for the old and new organization names | |
# read -p "Enter your old organization name: " old_org | |
# read -p "Enter your new organization name: " new_org | |
old_org=old_org | |
new_org=new_org | |
# Find all git directories recursively from the current directory | |
repos=$(find . -name ".git" -type d) |
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 | |
install_snap_redis () { | |
sudo snap install redis | |
} | |
install_apt_redis () { | |
sudo apt install lsb-release curl gpg | |
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg |
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 | |
checkout_latest_branch() { | |
# Fetch all remote branches | |
git fetch --all | |
# Get the remote branch with the latest commit | |
latest_branch=$(git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/remotes/origin/ | head -n 1) | |
if [ -n "$latest_branch" ]; then |
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
curl https://get.docker.com | sh | |
sudo sh -eux <<EOF | |
# Install newuidmap & newgidmap binaries | |
apt-get install -y uidmap | |
EOF |
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-role.sh | |
ROLE_ARN = arn:aws:iam::<YOUR_ACCOUNT_ID>:role/ec2SchedulerRole |
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 install_docker { | |
echo 'installing Docker...' | |
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
NewerOlder