首页
友情链接
关于
Search
1
欢迎使用 Typecho
13,185 阅读
2
Playwright使用记录
3,234 阅读
3
Windows上GCC安装
2,094 阅读
4
Unity独立安装后添加IL2CPP等编译组件
2,048 阅读
5
(Windows)以一种访问权限不允许的方式做了一个访问套接字的尝试处理
1,741 阅读
全部博文
游戏开发
Unity
Godot Engine
GDScript
编程代码
C#编程
GoLang编程
PowerShell
开发工具
Git
笔记备忘
登录
Search
标签搜索
docker
Godot
GCC
CMS
Proto.Actor
Actor模型
winpty
msys2
Unity
IL2CPP
package
golang
ssh
proxy
proxychains
minikube
k8s
n2n
PowerShell
ChatGPT
玖亖伍
累计撰写
29
篇文章
累计收到
216
条评论
首页
栏目
全部博文
游戏开发
Unity
Godot Engine
GDScript
编程代码
C#编程
GoLang编程
PowerShell
开发工具
Git
笔记备忘
页面
友情链接
关于
搜索到
29
篇与
的结果
2021-06-29
Docker笔记
示例DockerfileFROM alpine:latest ARG TAG=0.0.1 ARG PORT_ARG=3080 RUN apk add --no-cache bash # 切换默认shell为bash SHELL ["/bin/bash", "-c"] RUN echo tag=$TAG RUN echo port_tag=$PORT_ARG构建docker build --no-cache --progress plain --rm --build-arg TAG=0.0.3 --build-arg PORT_ARG=3000 --tag hello/world:0.0.3 .运行docker run hello/world:0.0.3笔记ARG 用来声明参数,语法为ARG <key>=<default-value>,需要在在FROM之后才会有作用build时, 通过--build-arg的方式传递,语法为--build-arg <key>=<value>, 可以多组参考How To Pass Environment Info During Docker BuildsDocker: How to use bash with an Alpine based docker image?
2021年06月29日
377 阅读
1 评论
0 点赞
2021-06-11
(Windows)以一种访问权限不允许的方式做了一个访问套接字的尝试处理
有一个ASP.NET Core的项目,使用了一个固定端口13501, 突然有一天,启动项目时,报System.Net.Sockets.SocketException (10013): 以一种访问权限不允许的方式做了一个访问套接字的尝试的异常,无法监听端口。此时第一反应是其他程序占用了13501端口,于是在cmd(出于bug敏感,直接以管理员身份启动)中执行netstat -ano | findstr 13501,发现啥也没有,说明不是被其他程序占用了,但是为何不让我监听使用呢?经过一番搜索/尝试/验证后,似乎在Stack Overflow上找到了方向:Kestrel unable to start在cmd尝试执行netsh interface ipv4 show excludedportrange protocol=tcp, 果然发现了13501是在排除范围之内(13492~13591):那么就想,能否移除这条规则呢,通过搜索来的命令,修改相关端口范围后执行:netsh interface ipv4 delete excludedportrange protocol=tcp startport=13492 numberofports=100果然发现自己还是太天真了。。。那怎么办呢?虽然曾经遇到这个问题后浅尝辄止,搞不定后直接重启,每次都可以解决,但是系统任务栏一排软件开启的,浏览器中无数个标签打开的,重启代价太大,而且这个问题就像个地雷,指不定以后啥时候还会在遇到,于是决定以excludedportrange为搜索关键词继续查找。终于,在Stack Overflow的兄弟网站StackExchange/superuser看到了希望。继续尝试看到的指令的指令(先停止掉NAT服务,然后再开启):net stop winnat netsh interface ipv4 show excludedportrange protocol=tcp net start winnat netsh interface ipv4 show excludedportrange protocol=tcp咦~好像OK了(判断依据: 13501已经不在排除端口范围之内了),再次运行我的ASP.NET Core的项目,正常监听,再(多此一举)看下端口监听:netstat -ano | findstr 13501一切正常,问题解决。参考Kestrel unable to startUnable to start Kestrel getting 'An attempt was made to access a socket in a way forbidden by its access permissions'Many excludedportranges how to delete - hyper-v is disabledUnable to bind ports: Docker-for-Windows & Hyper-V excluding but not using important port ranges #3171
2021年06月11日
1,741 阅读
1 评论
5 点赞
2021-04-12
Unity独立安装后添加IL2CPP等编译组件
如果Unity不是通过Unity Hub安装的,而是通过"添加已安装版本"添加到Unity Hub中时,并不能通过Unity Hub动态添加编译平台组件,而是需要单独下载。以 Unity 2019.4.10f1 添加 IL2CPP 编译组件为例,操作如下:进入 Unity 2019.4.10 页面如果是其他版本,则选择你已安装的Unity的对应的版本在 Component Installers Windows 或 Component Installers macOS 下选择要添加的编译组件, 此处选择 Windows (IL2CPP) Target Support 下载 IL2CPP 编译组件的安装包。下载后安装即可,需要注意的是 Choose Install Location 这一步,需要,选择你的 Unity.exe 上层目录 Editor 的上层目录(示例: 我的 Unity.exe 完整路径为 D:\installeds\Unity\2019.4.10f1\Editor\Unity.exe, 则此处需要选择的路径应该为 D:\installeds\Unity\2019.4.10f1),否则会报错说找不到 Unity.exe
2021年04月12日
2,048 阅读
0 评论
2 点赞
2021-03-14
WSL虚拟磁盘清理
使用 SpaceSniffer 查找出wsl虚拟磁盘位置SpaceSniffer下载地址及使用 请参见文章 Windows上使用工具推荐PowerShell 中查看wsl系统列表,将其关闭,然后进入diskpartwsl --list # `wsl --list`显示内容如下方注释所示 # 适用于 Linux 的 Windows 子系统分发版: # Ubuntu (默认) wsl --terminate Ubuntu diskpartdiskpart中操作select vdisk file=C:\Users\gsw94\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx compact vdisk exit参考Deleting a directory in WSL to free up disk space?WSL 2 should automatically release disk space back to the host OS
2021年03月14日
1,043 阅读
0 评论
1 点赞
2021-03-12
Windows上使用工具推荐
一、存储操作以下工具,请以管理员身份运行SpaceSniffer Windows上分析磁盘空间占用的工具,免费使用示例: Link Shell Extension (简称LSE)Windows上为文件或目录创建符号链接的工具,免费mklink 功能和LSE类似,是系统自带的工具二、截图/录屏Snipaste 截图工具,可以贴图使用示例截图使用示例-贴图参考Windows 中的 mklink 命令
2021年03月12日
495 阅读
0 评论
2 点赞
2021-02-27
OctoberCMS使用记录
前置说明操作系统: Ubuntu 20.04.1 LTSWEB组合:nginx/1.18.0 (Ubuntu) sudo apt install nginxphp-fpm7.4 sudo apt install php-fpmphp7.4 sudo apt install php用到的工具:wget sudo apt install wgetunzip sudo apt install unzip操作步骤确保PHP扩展已安装# 安装php扩展 sudo apt-get install php-ctype php-curl php-xml php-fileinfo php-gd php-json php-mbstring php-mysql php-sqlite3 php-zip # 重启php-fpm sudo service php7.4-fpm restart下载OctoberCMS安装文件 install-master.zipwget --continue --output-document=install-master.zip http://octobercms.com/download解压到Web所在目录unzip install-master.zip -d /home/gsw945/web-demos配置nginx以运行OctoberCMS安装文件sudo vim /etc/nginx/conf.d/octobercms.conf内容如下(一般nginx中的php简单配置)server { listen 1501; listen [::]:1501; root /home/gsw945/web-demos/install-master; index index.php index.html index.htm; server_name _; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; # 安装过程中需要下载文件,所以需要设置较长的超时时间(单位:秒, 默认为60) fastcgi_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_connect_timeout 3600; } location ~ /\.ht { deny all; } }让nginx重新加载配置sudo service nginx reload执行安装操作 浏览器访问 http://127.0.0.1:1501/install.php 开始执行安装脚本System Check确保每一项都是OK的,否则需要修复问题后刷新页面重新检查 确认无误后,点击页面右下角按钮 Agree & Continue 进入下一步骤ConfigurationDatabase 数据库配置,按需设置(此处以最简单的 SQLite 为例) Administrator 平台管理账户配置,按需设置(用户名和密码请妥善记忆) Advanced 高级配置(安全性),按需设置,可保持默认 确认无误后,点击页面右下角按钮 Continue 进入下一步骤Getting started 提供了3种方式: Start from scratch 不选择任插件和主题(仅自动包含默认的demo),需要手写网页代码(HTML/CSS/JS)选择该方式,会立即开始下载默认的demo主题 中途可能会出现下载超时的情况 可以酌情修改nginx配置,示例如下server { listen 1501; listen [::]:1501; root /home/gsw945/web-demos/install-master; index index.php index.html index.htm; server_name _; location / { try_files $uri $uri/ =404; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; # 安装过程中需要下载文件,所以需要设置较长的超时时间(单位:秒, 默认为60) fastcgi_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_connect_timeout 3600; } location ~ /\.ht { deny all; } }执行nginx的 reload 或 restart` 命令,重新加载应用配置后,点击 Try again 即可继续上一步的操作下载完成之后,会自动解压并清除安装文件,显示如下内容,则表示已经安装成功 Website address 网站前台Administration Area 网站管理后台点击网站前台链接,可正常进入网站前台,但是点击前台页面内页面顶部的链接和网站管理后台链接,页面却显示 404 Not Found,这是因为需要继续针对nginx进行设置,添加OctoberCMS需要的配置,同时移除安装阶段添加的超时设置(因为默认的60秒超时已足够),完整配置如下:server { listen 1501; listen [::]:1501; root /home/gsw945/web-demos/install-master; index index.php index.html index.htm; server_name _; location / { rewrite ^/.*$ /index.php last; } location ~ ^/index.php { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.4-fpm.sock; } location ~ /\.ht { deny all; } # Whitelist ## Let October handle if static file not exists location ~ ^/favicon\.ico { try_files $uri /index.php; } location ~ ^/sitemap\.xml { try_files $uri /index.php; } location ~ ^/robots\.txt { try_files $uri /index.php; } location ~ ^/humans\.txt { try_files $uri /index.php; } ## Let nginx return 404 if static file not exists location ~ ^/storage/app/uploads/public { try_files $uri 404; } location ~ ^/storage/app/media { try_files $uri 404; } location ~ ^/storage/app/resized { try_files $uri 404; } location ~ ^/storage/temp/public { try_files $uri 404; } location ~ ^/modules/.*/assets { try_files $uri 404; } location ~ ^/modules/.*/resources { try_files $uri 404; } location ~ ^/modules/.*/behaviors/.*/assets { try_files $uri 404; } location ~ ^/modules/.*/behaviors/.*/resources { try_files $uri 404; } location ~ ^/modules/.*/widgets/.*/assets { try_files $uri 404; } location ~ ^/modules/.*/widgets/.*/resources { try_files $uri 404; } location ~ ^/modules/.*/formwidgets/.*/assets { try_files $uri 404; } location ~ ^/modules/.*/formwidgets/.*/resources { try_files $uri 404; } location ~ ^/modules/.*/reportwidgets/.*/assets { try_files $uri 404; } location ~ ^/modules/.*/reportwidgets/.*/resources { try_files $uri 404; } location ~ ^/plugins/.*/.*/assets { try_files $uri 404; } location ~ ^/plugins/.*/.*/resources { try_files $uri 404; } location ~ ^/plugins/.*/.*/behaviors/.*/assets { try_files $uri 404; } location ~ ^/plugins/.*/.*/behaviors/.*/resources { try_files $uri 404; } location ~ ^/plugins/.*/.*/reportwidgets/.*/assets { try_files $uri 404; } location ~ ^/plugins/.*/.*/reportwidgets/.*/resources { try_files $uri 404; } location ~ ^/plugins/.*/.*/formwidgets/.*/assets { try_files $uri 404; } location ~ ^/plugins/.*/.*/formwidgets/.*/resources { try_files $uri 404; } location ~ ^/plugins/.*/.*/widgets/.*/assets { try_files $uri 404; } location ~ ^/plugins/.*/.*/widgets/.*/resources { try_files $uri 404; } location ~ ^/themes/.*/assets { try_files $uri 404; } location ~ ^/themes/.*/resources { try_files $uri 404; } }浏览器进入管理后台 http://127.0.0.1:1501/backend,输入刚才自己设置的用户名和密码登录,发现页面都是英文的,点击页面右上角的头像图标,在显示的下拉框中点击 Back-end preferences 就可打开语言设置页面,按需设置后保存,刷新页面,发现就变成了自己想要的语言(如下以简体中文为例) Start from a theme 选择某一种网站类型的主题,基于此创建站点选择该方式,会出现主题列表供选择 确认眼神,选择一个主题(如下以 Flat UI 为例)后,点击 install,会有确认提示,点击 confirm 就会开始下载 后续和 Start from scratch 方式相同Use a project ID 适用于创建过 OctoberCMS 项目,或自定义选择插件和主题的情况,暂不考虑后续操作,譬如邮件设置、自选插件和主题等设置,可在管理后台中操作,此处不再赘述。参考Installation - October CMSConfiguration - October CMSNginx + Php-fpm fastcgi upstream timed out
2021年02月27日
447 阅读
0 评论
0 点赞
2021-02-04
GDScript中二进制与十进制转换
十进制数字转二进制字符串# Takes in a decimal value (int) and returns the binary value (int) func dec2bin(var decimal_value): var binary_string = "" var temp var count = 31 # Checking up to 32 bits while(count >= 0): temp = decimal_value >> count if(temp & 1): binary_string = binary_string + "1" else: binary_string = binary_string + "0" count -= 1 return binary_string二进制字符串转十进制数字# Takes in a binary value (int) and returns the decimal value (int) func bin2dec(var binary_value): var decimal_value = 0 var count = 0 var temp binary_value = int(binary_value) while(binary_value != 0): temp = binary_value % 10 binary_value /= 10 decimal_value += temp * pow(2, count) count += 1 return decimal_value参考/来源How can I work with binary numbers?
2021年02月04日
551 阅读
0 评论
0 点赞
2021-01-30
Windows上GCC安装
本篇文章可能是最简单Windows上安装的GCC的教程,这都的得感谢 TDM-GCC。TDM-GCC 是对Windows友好的GCC版本, 基于MinGW, 包含 GCC C/C++、GNU binutils、mingw32-make、GDB 等工具。下载页面: Download | tdm-gcc下载时注意区分32位和64位,推荐第2种(64位+32位版本)。tdm-gcc-webdl.exe 网络下载器tdm64-gcc-9.2.0.exe 包含64位+32位版本tdm-gcc-9.2.0.exe 仅包含32位版本下载完成后,直接安装即可。安装时记得保持添加环境变量Path的默认选项,或安装完成后手动添加。
2021年01月30日
2,094 阅读
1 评论
1 点赞
2021-01-22
欢迎使用 Typecho
如果您看到这篇文章,表示您的 blog 已经安装成功.
2021年01月22日
13,185 阅读
66 评论
3 点赞
1
2
3