This document now exists on the official ASP.NET core docs page.
- Application
- Request Handling
| # Thanks to https://twitter.com/elijahmanor/status/1557003773272133632 | |
| alias fv="fd --type f --hidden --exclude .git | fzf-tmux -p --reverse | xargs nvim" | |
| alias fkill="ps | fzf | cut -d\" \" -f1 | xargs kill -9" |
| <html> | |
| <head> | |
| <title>Interpretoy REPL</title> | |
| </head> | |
| <body> | |
| <script> | |
| // based on lispy by Peter Norvig: http://norvig.com/lispy.html | |
| function load(source) { |
| // Gekke type-shit in Typescript | |
| // duck typing | |
| // interface IFoo { | |
| // toString: () => string | |
| // } | |
| type ToStringable = { myToString: () => string } | |
| function loggo<T extends ToStringable>(x: T) { |
This document now exists on the official ASP.NET core docs page.
| using System; | |
| using System.Collections.Generic; | |
| using static System.Console; | |
| namespace Union | |
| { | |
| class Program | |
| { | |
| public static void Main() | |
| { |
NB;
| # prerequisites: | |
| ## install software | |
| apt install mariadb-server libmariadbclient-dev sqlite3 | |
| ## install mysqlclient in virtualenv | |
| su -c 'homeassistant/bin/pip3 install mysqlclient --upgrade' -l homeassistant | |
| ## create database | |
| mysql -e 'CREATE SCHEMA IF NOT EXISTS `hass_db` DEFAULT CHARACTER SET utf8' | |
| ## create user (use a safe password please) | |
| mysql -e "CREATE USER 'hass_user'@'localhost' IDENTIFIED BY 'hass_pw'" | |
| mysql -e "GRANT ALL PRIVILEGES ON hass_db.* TO 'hass_user'@'localhost'" |
| #!/usr/bin/python3 | |
| """ | |
| msysGit to Unix socket proxy | |
| ============================ | |
| This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows). | |
| It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the | |
| ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other |
| ## Just source this file in your .$SHELLrc | |
| # Import SSH-Keys from KeePass KeeAgent | |
| # Enable msysgit socken in KeeAgent! | |
| if [[ -z $SSH_AUTH_SOCK ]]; then | |
| export SSH_AUTH_SOCK="/tmp/.ssh-auth-sock" | |
| fi | |
| if [[ ! -f /tmp/msysgit2unix-socket.pid ]]; then | |
| ~/bin/msysgit2unix-socket.py /mnt/c/Users/$USER/keeagent.sock:$SSH_AUTH_SOCK |