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
#!/usr/bin/env bash | |
FILE_NAME_PATTERN="index.ts" | |
git branch --format="%(refname:short)" | xargs -I {} sh -c 'git ls-tree -r --name-only "{}" | grep -q "${FILE_NAME_PATTERN}" && echo "File exists in {}"' |
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
#!/usr/bin/env bash | |
# 1) determine which files have been modified from master in the current branch | |
# 2) create a new, temporary branch from master | |
# 3) run prettier on the modified files in master | |
# 4) commit these to the temporary branch | |
# 5) print some instructions on how to rebase the current branch onto the temporary branch. | |
set -eo pipefail |
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 | |
ARGOCD_NAMESPACE="argocd" | |
ARGOCD_ADMIN_PORT="8080" | |
check_argocd_installed() { | |
if command -v argocd >/dev/null 2>&1; then | |
echo "- Argo CD CLI is installed." | |
else | |
echo "*** Argo CD CLI is not installed." |
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
openapi: 3.0.0 | |
paths: | |
/: | |
get: | |
operationId: AppController_getHello | |
parameters: [] | |
responses: | |
'200': | |
description: '' | |
/tracks/{id}: |
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
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && \. "/opt/homebrew/opt/nvm/nvm.sh" # This loads nvm | |
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
# NVM INTEGRATION | |
# https://github.com/nvm-sh/nvm#deeper-shell-integration | |
autoload -U add-zsh-hook |
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 Get-NGrokHostName | |
{ | |
Param( | |
[Parameter(Mandatory = $True)][String]$TunnelName | |
) | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$response = Invoke-WebRequest 'http://127.0.0.1:4040/api/tunnels' | |
$obj = $response.Content | ConvertFrom-Json |
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
from decimal import Decimal | |
from functools import reduce | |
from django.db import connection, reset_queries | |
from apps.accounts.models import User | |
me = User.objects.get(email='[email protected]') | |
iterations = 1000 | |
def test_save(iterations1 = 1000): | |
reset_queries() | |
for i in range(iterations1): |
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
# Kubernetes deployment for teamcity server with three agents, each with mssql/development on azure. | |
# This assumes a two-node cluster | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: teamcity-server-premium-logs-disk | |
spec: | |
accessModes: | |
# https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv |
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
# This assumes that it's in a folder `scripts` beside the `build` folder. | |
# | |
# Try to address this error: | |
# | |
# Unable to resolve module `@blah/whatever` from `whatever.js`: Module `@blah/whatever` does not exist in the Haste module map | |
# | |
# This might be related to https://github.com/facebook/react-native/issues/4968 | |
# To resolve try the following: | |
# 1. Clear watchman watches: `watchman watch-del-all`. | |
# 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`. |
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
#!/usr/bin/env bash | |
#? | |
# SSL Info - Displays information about the provided URL's SSL certificate. | |
# | |
# USAGE | |
# sslinfo [OPTIONS] URL | |
# | |
# ARGUMENTS | |
# 1. URL (string): URL to display SSL certificate information for. Should | |
# not have a scheme components (ex., https://). |
NewerOlder