Some personal notes for customize my local Ubuntu machine for work (web development mainly), includes tools a some tweaks. Before anything else lets just create a .tmp dir for .deb and source files.
mkdir -p ~/.tmp
cd .tmp| #!/usr/bin/env bash | |
| # Installer script | |
| # ----------------------------------------------- | |
| # This script is responsible for creating proper | |
| # directories and files and the installation of | |
| # ansible package any other dependencies needed | |
| # and executing provitioning playbook. | |
| # ----------------------------------------------- | |
| echo \ \ \ \ |
| LoadModule deflate_module modules/mod_deflate.so | |
| LoadModule filter_module modules/mod_filter.so | |
| <IfModule mod_deflate.c> | |
| <IfModule mod_filter.c> | |
| # Set compression level | |
| DeflateCompressionLevel 9 | |
| # Compress these named file types | |
| AddOutputFilterByType DEFLATE text/html |
| // Using array_merge inside loops is a greedy construction, also cannot | |
| // sum arrays since their indexes are the same. | |
| // @see https://stackoverflow.com/a/37065301 | |
| @array_push($arr1, ...$arr2); |
| drush php:eval '$update_hook_name = "POST_UPDATE_NAME"; $key_value = \Drupal::keyValue('post_update'); $existing_updates = $key_value->get('existing_updates'); $index = array_search($update_hook_name,$existing_updates); unset($existing_updates[$index]); $key_value->set('existing_updates', $existing_updates);' |
| version: "3" | |
| services: | |
| php: | |
| environment: | |
| PHP_XDEBUG: 1 | |
| PHP_XDEBUG_MODE: debug | |
| PHP_XDEBUG_START_WITH_REQUEST: "yes" | |
| PHP_IDE_CONFIG: serverName=phpstorm | |
| PHP_XDEBUG_IDEKEY: "phpstorm" | |
| PHP_XDEBUG_CLIENT_HOST: host.docker.internal |
| INSERT INTO ps_access SELECT 1, `ar`.`id_authorization_role` FROM `ps_authorization_role` ar | |
| LEFT JOIN ps_access a ON( ar.id_authorization_role = a.id_authorization_role AND a.id_profile = 1) | |
| WHERE a.id_profile IS NULL |
| # This is Git's per-user configuration file. | |
| [alias] | |
| last = log -1 --stat | |
| cp = cherry-pick | |
| co = checkout | |
| cl = clone | |
| ci = commit | |
| cin = commit --no-verify | |
| st = status -sb | |
| br = branch |
This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
To enable systemd under WSL we require a tool called systemd-genie
Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:
cd /tmpI hereby claim:
To claim this, I am signing this object: