Skip to content

Instantly share code, notes, and snippets.

@gnthibault
gnthibault / debug_docker_build.sh
Created November 26, 2024 12:52
debug_docker_build_by_layer
# If you want to debug a layer:
# DOCKER_BUILDKIT=0 docker build --platform linux/arm64/v8 -t test_to_delete .
# docker run -it --rm 1941be9e1d8c /bin/bash
@gnthibault
gnthibault / change_default_shell.sh
Created October 31, 2024 06:32
Change default macOS terminal shell to bash
# Change the default shell to Bash by running the following command:
chsh -s /bin/bash
@gnthibault
gnthibault / tilde.sh
Created October 30, 2024 13:48
Tilde on macbook
# With swiss keyboard:
Shift + > + space
# US keybpard
Shift + ` + space
# It is basically the key right next to the left Shift key + Shift key itself + space
@gnthibault
gnthibault / disable_zscaler.sh
Created October 30, 2024 09:42
enable/disable zscaler on macOS
sudo launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && sudo launchctl unload /Library/LaunchDaemons/com.zscaler.UPMServiceController.plist
@gnthibault
gnthibault / unequarantine_os_x_file.sh
Last active August 10, 2024 18:52
Get rid of apple quarantine attribute stuff
xattr -d com.apple.quarantine /path/to/file
@gnthibault
gnthibault / sh
Last active July 22, 2024 08:30
DNS debugging on mac
#!/bin/bash
# From https://rakhesh.com/powershell/vpn-client-over-riding-dns-on-macos/
# You can debug dns issues with: dns-sd -G v4v6 host.example.com
# You can put this file in home then crontab:
# @hourly /Users/yourname/fix_dns.sh
sudo scutil << EOF
get State:/Network/Service/gpd.pan/DNS
d.remove SearchDomains
d.remove ServerAddress
@gnthibault
gnthibault / search_for_branch_in_all_dirs.sh
Created June 13, 2024 09:55
Search branch name is all subdirectories. Espace specific bash color character from ls
for i in $(ls -d */); do echo "$i"; cd $(echo "$(pwd)/$i" | sed -e $'s/\x1b\[[0-9;]*m//g'); git branch | grep BRANCH_NAME_TO_SEARCH ;cd ..; done
@gnthibault
gnthibault / utm_basic_install.sh
Last active June 12, 2024 08:44
Install default setup in ubuntu when ran into UTM, qemu based virtualization
#!/bin/bash
# Install prerequisites
sudo apt install -y ubuntu-desktop
sudo apt install -y qemu-guest-agent, spice-vdagent, spice-webdavd, davfs2
# Check if spice vdagent is enabled to get right click/clipboard working through utm
sudo systemctl start spice-vdagent
sudo systemctl enable spice-vdagent
sudo systemctl status spice-vdagent
@gnthibault
gnthibault / df_pydantic_validate.ipynb
Created April 17, 2023 07:20 — forked from niloch/df_pydantic_validate.ipynb
DataFrame Validation with Pydantic (including self validating dataframs)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Terraform v1.1.5
on linux_amd64
Initializing plugins and modules...
{"@level":"info","@message":"Terraform 1.1.5","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:52.985423Z","terraform":"1.1.5","type":"version","ui":"1.0"}
{"@level":"info","@message":"module.gcloud.null_resource.gcloud_init: Plan to replace","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:59.765190Z","change":{"resource":{"addr":"module.gcloud.null_resource.gcloud_init","module":"module.gcloud","resource":"null_resource.gcloud_init","implied_provider":"null","resource_type":"null_resource","resource_name":"gcloud_init","resource_key":null},"action":"replace","reason":"cannot_update"},"type":"planned_change"}
{"@level":"info","@message":"module.monitoring.module.stackdriver-alerting.google_monitoring_metric_descriptor.with_alert: Plan to replace","@module":"terraform.ui","@timestamp":"2022-03-16T16:22:59.766321Z","change":{"resource":{"addr":"module.monitoring.module.stackdriver-alerting.google_monitoring_metric_descriptor.with