国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Autodesk.Revit.DB; | |
| using System.IO; | |
| using Autodesk.Revit.ApplicationServices; | |
| using Autodesk.Revit.UI.Events; | 
| # Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it | |
| # then iterate opening the selected ports | |
| $principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
| if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
| $remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ } | |
| $found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'; | |
| if($found) { | |
| $remoteport = $matches[0]; | |
| } else{ | 
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
I have tried to setup redis as starting background task with wsl-autostart, Task Scheduler and with lot vbs scripts including one described here but none of them seemed to work.
In the end I have manually created a simple one that does the job. This script basically starts a hidden Ubuntu Window and starts redis-server inside it.
sudo apt install redis-server| // 'downloadFile.js', written by blending two solutions: | |
| // 'js-download' https://github.com/kennethjiang/js-file-download | |
| // 'Anders Paulsen' https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/ | |
| export function downloadFile(data, filename, mime) { | |
| // It is necessary to create a new blob object with mime-type explicitly set | |
| // otherwise only Chrome works like it should | |
| const blob = new Blob([data], {type: mime || 'application/octet-stream'}); | |
| if (typeof window.navigator.msSaveBlob !== 'undefined') { | |
| // IE doesn't allow using a blob object directly as link href. | 
Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.
/etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
Port to 2222 (or any other port above 1000)PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.sudo service ssh --full-restart| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Mime type checker</title> | |
| <script type="text/javascript" src="/jquery.min.js"></script> | |
| <script> | |
| $(function () { | |
| var result = $('div#result'); | |
| if (window.FileReader && window.Blob) { | 
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --installOptionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from
/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json.
As an open source object-relational database management system, PostgreSQL available for MacOS, Linux, and Windows.
The goal will be to run the following command successfully from the command line (regardless of the OS):
psql -U postgres
This should open the psql interactive shell and print a prompt that looks like:
The package which is used in this article is avaible on MyGet on this url: https://www.myget.org/F/orchardcore-preview/api/v3/index.json
This article walks you through the steps for using Portable Object files (PO files) inside your ASP.NET Core application.
PO files are files that contain the translated strings for a given language. They reveal very useful as contrary to standard resx files, PO files support pluralization and are distributed as text files.