Skip to content

Instantly share code, notes, and snippets.

View jjmartres's full-sized avatar
🚀
looking for a new position !

Jean-Jacques Martrès jjmartres

🚀
looking for a new position !
View GitHub Profile
@jjmartres
jjmartres / excludeWSL.ps1
Last active September 2, 2021 09:14 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
############
# This script will add your WSL environments to the Windows Defender exclusion list so that
# realtime protection does not have an adverse effect on performance.
#
# You should be aware that this could make your system less secure. Use at your own risk.
# Note: This should be run from an administrative PowerShell prompt
############
# Find registered WSL environments
$wslPaths = (Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss | ForEach-Object { Get-ItemProperty $_.PSPath}).BasePath
@jjmartres
jjmartres / gh-bulk-clone.md
Created July 13, 2021 12:54
GitHub bulk clone

GitHub bulk clone

# download a maximum of 1000 @group's repos and organize them under `./group/`:
gh repo list group --limit 1000 | while read -r repo _; do
  gh repo clone "$repo" "$repo"
done
@jjmartres
jjmartres / how-to-reduce-size-of-docker-data-volume-in-docker-desktop-for-windows-v2.md
Last active February 20, 2024 04:33
How to reduce size of docker data volume in Docker Desktop for Windows v2

How to reduce size of docker data volume in Docker Desktop for Windows v2

Docker Desktop for Windows v2, which uses WSL2, stores all image and container files in a separate virtual volume (vhdx). This virtual hard disk file can automatically grow when it needs more space (to a certain limit). Unfortunately, if you reclaim some space, i.e. by removing unused images, vhdx doesn't shrink automatically.

Optimize

wsl --shutdown
Optimize-VHD -Path "$($env:LOCALAPPDATA)\Docker\wsl\data\ext4.vhdx" -Mode Full
@jjmartres
jjmartres / ubuntu-preseed.txt
Created July 12, 2021 07:24 — forked from refraction-ray/ubuntu-preseed.txt
sample preseed for ubuntu
#### Contents of the preconfiguration file (for stretch)
### direct copy from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Localization
# Preseeding only locale sets language, country and locale.
d-i debian-installer/locale string en_US
# The values can also be preseeded individually for greater flexibility.
#d-i debian-installer/language string en
#d-i debian-installer/country string NL
@jjmartres
jjmartres / how-to-shrink-a-wsl2-virtual-disk.md
Last active April 22, 2024 09:35
How to Shrink a WSL2 Virtual Disk

How to Shrink a WSL2 Virtual Disk

Before you begin

Before shrinking a WSL2 virtual disk, you need to ensure that WSL2 is not running.

You can check if it’s running with the command wsl.exe --list --verbose in PowerShell:

PS C:\Users\valorin> wsl.exe --list --verbose
 NAME STATE VERSION
@jjmartres
jjmartres / helm-chart-conventions.md
Last active March 1, 2023 10:22
Helm chart conventions
@jjmartres
jjmartres / command.log
Created September 24, 2020 10:10
caselog
2020/09/24 12:08:17 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/09/24 12:08:17 [INFO] Terraform version: 0.13.0
2020/09/24 12:08:17 [INFO] Go runtime version: go1.14.2
2020/09/24 12:08:17 [INFO] CLI args: []string{"/usr/local/bin/terraform", "get"}
2020/09/24 12:08:17 [DEBUG] Attempting to open CLI config file: /home/jjmartres/.terraformrc
2020/09/24 12:08:17 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/09/24 12:08:17 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2020/09/24 12:08:17 [DEBUG] ignoring non-existing provider search directory /home/jjmartres/.terraform.d/plugins
@jjmartres
jjmartres / AllCyberghostConfigUrls.md
Last active April 8, 2023 02:29 — forked from Betree/AllCyberghostConfigUrls.md
Cyberghost linux VPN configs urls for all countries

Cyberghost linux VPN configs urls for all countries

Download all the available linux configurations for your cyberghost account using the following links. These links are good for a premium account using openvpn UDP. If you want to use a different protocol, are not premium or if you want an up-to-date list, please follow the guide in the "Method" section.

You must be logged in to download these links !

Method

  1. Connect to your account at https://account.cyberghostvpn.com/
@jjmartres
jjmartres / clean-docker.sh
Last active May 30, 2018 07:44
Clean Docker
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
@jjmartres
jjmartres / README.md
Created November 14, 2016 09:47 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index: