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 | |
find . -name "Icon?" -print0 | xargs -0 rm -rf |
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
# Without cache | |
drush sql-dump --structure-tables-list=cache,cache_* > dumpfile.sql | |
# Without cache, search index and watchdog | |
drush sql-dump --structure-tables-list=cache,cache_*,search_index,watchdog > dumpfile.sql | |
# Without table spaces | |
drush sql-dump --structure-tables-list=cache,cache_*,search_index,watchdog --extra-dump="--no-tablespaces --column-statistics=0 --set-gtid-purged=OFF" > db.sql |
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 startupgrowth_preprocess_links__language_block(&$variables) { | |
foreach ($variables['links'] as $i => $link) { | |
/** @var \Drupal\language\Entity\ConfigurableLanguage $linkLanguage */ | |
// $linkLanguage = $link['link']['#options']['language']; | |
// $variables['links'][$i]['link']['#title'] = $linkLanguage->get('id'); | |
$variables['links'][$i]['link']['#title']= $i; | |
} | |
} |
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
docker container stop $(docker container ls -aq) | |
docker container rm $(docker container ls -aq) | |
docker system prune --volumes |
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
:: Download Ubuntu 22.04 from Microsoft Store | |
:: Launch Ubuntu 22.04. The Ubuntu installation GUI window will be black. Close it. | |
:: Open PowerShell and start the setup in TUI mode | |
sl --shutdown | |
wsl --unregister Ubuntu-22.04 | |
ubuntu2204.exe --ui=tui | |
:: See | |
:: https://github.com/microsoft/WSL/issues/8525 |
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 | |
# Download trustlist, signature and certificate | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip.sig.txt | |
wget https://ec.europa.eu/assets/eu-dcc/eu_signer.pem.txt | |
# Convert the signature file from base64 encoded to plain DER file | |
openssl base64 -a -A -d -in dcc_trustlist.zip.sig.txt -out dcc_trustlist.zip.sig.der | |
# Verify the integrity | |
openssl cms -verify -in dcc_trustlist.zip.sig.der -inform DER -content dcc_trustlist.zip -binary -CAfile eu_signer.pem.txt --out /dev/null |
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
# Download bfg for | |
# https://rtyley.github.io/bfg-repo-cleaner/ | |
java -jar bfg.jar --delete-files {filename} | |
git push --force |
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
"c:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --disable-web-security --disable-gpu --user-data-dir=c:/tmp/chromeTemp |
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
# Encrypt and zip | |
7za a -tzip -pMY_SECRET -mem=AES256 secure.zip doc.pdf doc2.pdf doc3.pdf | |
# Decrypt and unzip | |
7za e secure.zip |
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
# List all the ignored files previously commited | |
git ls-files -ci --exclude-standard | |
# Remove file from Git's history. It keeps it in the file system | |
git rm --cached path/to/file | |
# Remove all the ignored files | |
git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached |
NewerOlder