Skip to content

Instantly share code, notes, and snippets.

Avatar

Nordine Ben Bachir nordineb

View GitHub Profile
@nordineb
nordineb / README.md
Last active Nov 8, 2021
Azure DevOps, ssh-rsa, openssh
View README.md

I wasn't able to git fetch from Azure DevOps repos after upgrading openssh on my computer.

ssh -V
  OpenSSH_8.8p1, OpenSSL 1.1.1l  24 Aug 2021

Turns out that OpenSSL has now turned off ssh-rsa by default:

This release disables RSA signatures using the SHA-1 hash algorithm by default.

But Azure DevOps doesn't support anything else... Add the following to your config file to re-enable ssh-rsa for Azure DevOps:

@nordineb
nordineb / .gitconfig
Last active Oct 14, 2021 — forked from tomdwp/.gitconfig
Git diff and merge with p4merge (macOS)
View .gitconfig
[merge]
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
[diff]
tool = p4merge
@nordineb
nordineb / README.md
Created Jun 22, 2021
Sleep transition timed out after 180 seconds while creating hibernation file or while calling rootDomain's clients about upcoming rootDomain's state changes
View README.md

No solution

sudo pmset -a hibernatemode 0
pmset -g | grep hibernatemode
 hibernatemode        0
@nordineb
nordineb / README.md
Created Jun 10, 2021
PGP check encrypted file
View README.md
gpg --pinentry-mode cancel --list-packets 
```
@nordineb
nordineb / README.md
Created Jun 10, 2021
helm2 and helm3 on MacOS
View README.md
brew install helm@2
brew install helm
cd /usr/local/bin
ln -s /usr/local/opt/helm@2/bin/tiller tiller
ln -s /usr/local/opt/helm@2/bin/helm helm2
ln -s helm helm3
@nordineb
nordineb / readme.MD
Last active Sep 16, 2021
Enable EPOCCAM on Teams for Mac and Discord on Mac
View readme.MD

Enable EPOCCAM on Teams for Mac

xcode-select --install (only if you haven't already)
sudo codesign --remove-signature "/Applications/Microsoft Teams.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (GPU).app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (Plugin).app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (Renderer).app"
@nordineb
nordineb / readme.MD
Created Mar 9, 2021
multipass + qemu on macos
View readme.MD

Multipass can launch and run virtual machines and configure them with cloud-init like a public cloud

brew install multipass libvirt
sudo multipass set local.driver=qemu
@nordineb
nordineb / readme.MD
Created Mar 9, 2021
Touch ID for sudo
View readme.MD

sudo vi /etc/pam.d/sudo

# sudo: auth account password session
auth       sufficient     pam_tid.so
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so
@nordineb
nordineb / script-template.sh
Created Dec 16, 2020 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
View script-template.sh
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@nordineb
nordineb / readme.MD
Last active Dec 12, 2020
Kubectl tips
View readme.MD

Can be added to ~/.bashrc

alias k='kubectl'
alias kgp='kubectl get pods'
alias kgpa='kubectl get pods --all-namespaces'
alias kgs='kubectl get svc'
alias kgsa='kubectl get svc --all-namespace
export dry='--dry-run=client -o yaml'
k run nginx --image=nginx --restart=Never $dry