Skip to content

Instantly share code, notes, and snippets.

@RaphHaddad
RaphHaddad / social-media-filter-adguard.txt
Last active November 9, 2023 23:51
social media filter for adguard
||facebook.com^
||twitter.com^
||messenger.com^
||x.com^
||linkedin.com^
||reddit.com^
||youtube.com^
function Secure-StorageAccount {
param(
[Parameter(Mandatory=$true)]
[string]$storageAccount,
[Parameter(Mandatory=$true)]
[string]$vnetName,
[Parameter(Mandatory=$true)]
[string]$subnetName,
[Parameter(Mandatory=$true)]
[string]$vnetResourceGroup

Terraform Tricks

Delete and Recreate

Use the -replace flag

Targeting resource within module

terraform apply -replace="module.mssql_database.azurerm_mssql_database.mssql_database"

README

Current Branch

git config --global alias.which-branch 'branch --show-current'
@RaphHaddad
RaphHaddad / azure-devops-cli.md
Last active July 27, 2022 23:13
Azure DevOps cli

Azure DevOps CLI Tricks

Run all pipelines with JMESQuery

az pipelines list --query "[?path=='\\back-end'] | [].id" --output tsv | xargs -L1 az pipelines run --branch main --id

Find all pipelines under folder with Id and Name

az pipelines list --query "[?path=='\\back-end'] | [].{ID:id, NAME:name}" --output tsv
@RaphHaddad
RaphHaddad / burning-iso-onto-disk.txt
Last active May 12, 2022 04:56
Burning ISO onto disk
# Replace
% diskutil list
...
...
...
/dev/disk4 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: CCCOMA_X64FRE_EN-GB... *64.4 GB disk4
% diskutil unmountDisk /dev/disk4
% sudo dd if=/path/to/iso/iso-name.iso of=/dev/disk4 bs=1m
@RaphHaddad
RaphHaddad / README.md
Last active October 16, 2019 05:13
Monorepo template README

README

The {{PRODUCT_NAME}} monorepository created by {{COMPANY_NAME}}.

The repositories

Folder Name Description Build Release Target
Folder name of source Description build badge add release badge add target example: a url
docs documentation as code build badge add release badge https://my-company.com/product/docs
### Keybase proof
I hereby claim:
* I am RaphHaddad on github.
* I am raphhaddad (https://keybase.io/raphhaddad) on keybase.
* I have a public key whose fingerprint is 18BD F503 3B17 77D4 2470 CCD4 1CE1 5502 0933 7B4F
To claim this, I am signing this object: