Bash on WSL is great.
But if you want a little extra from your terminal you can install zsh and oh-my-zsh pretty easily.
- Ubuntu WSL
This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).
Running this script should look the same in tmux as without.
curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh| //Prompt users to update app if there is a new version available | |
| //Uses url_launcher package | |
| import 'package:url_launcher/url_launcher.dart'; | |
| const APP_STORE_URL = | |
| 'https://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=YOUR-APP-ID&mt=8'; | |
| const PLAY_STORE_URL = | |
| 'https://play.google.com/store/apps/details?id=YOUR-APP-ID'; |
| import datetime | |
| from functools import wraps | |
| from werkzeug.security import ( | |
| generate_password_hash, | |
| check_password_hash | |
| ) | |
| from flask import abort |
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| use Illuminate\Http\Response; | |
| /** | |
| * Validate Mailgun Webhooks | |
| * @see https://documentation.mailgun.com/user_manual.html#securing-webhooks |
| # Stop all containers | |
| docker stop `docker ps -qa` | |
| # Remove all containers | |
| docker rm `docker ps -qa` | |
| # Remove all images | |
| docker rmi -f `docker images -qa ` | |
| # Remove all volumes |
| @echo off | |
| FOR /f "tokens=*" %%i IN ('docker ps -aq') DO docker rm %%i | |
| FOR /f "tokens=*" %%i IN ('docker images --format "{{.ID}}"') DO docker rmi %%i |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| #!/bin/bash | |
| repos=( | |
| "/c/projects/project-1" | |
| "/c/projects/project-2" | |
| "/c/projects/project-3" | |
| ) | |
| echo "" | |
| echo "Getting latest for" ${#repos[@]} "repositories using pull --rebase" |
| # REF: http://www.quora.com/How-do-I-create-and-update-embedded-documents-with-MongoEngine | |
| class Comment(EmbeddedDocument): | |
| content = StringField() | |
| name = StringField(max_length=120) | |
| class Post(Document): | |
| title = StringField(max_length=120, required=True) | |
| author = StringField(required=True) |