飞舞的卡农
Log in Subscribe
Log in Subscribe
Hi I'm Airycanon

Airycanon

23 posts
iTerm2 调教记录

iTerm2 调教记录

自动登录 公司内的开发环境是需要通过堡垒机来登录的,之前每次登录都要手动输入两次 ssh 命令,非常麻烦,经过研究可以用如下方式实现自动登录 * 创建一个 Profile,在图中的位置填入登录堡垒机的 ssh命令。 * 给这个 Profile 增加一个 Trigger,当前一条登录命令执行成功后,这里可以通过识别堡垒机输出的字符,自动执行下一步 ssh 命令。 * 经过上面两步 ssh 命令的自动输入,最终实现自动登录到开发环境。 快捷键选择不同的 Profile 经过上一步的操作之后,创建了多个 Profile,想要通过快捷键在不同的

  • Go to the profile of  Airycanon
Airycanon
19 Mar 2020 · 2 min read
NGINX 微服务 Unit + PHP 初探
Nginx

NGINX 微服务 Unit + PHP 初探

简介 -------------------------------------------------------------------------------- NGINX Unit 是一个动态的网络应用服务器,它的设计初衷是为了运行多种编程语言。如有需要,通过 API 可以动态配置已有应用的参数。 核心功能 -------------------------------------------------------------------------------- * 可使用 RESTful JSON API 动态配置服务器 * 可同时运行多语言及多版本的应用 * 动态语言的进程管理功能(开发中) * TLS 支持(开发中) * TCP, HTTP, HTTPS, HTTP/2 路由和代理(开发中)

  • Go to the profile of  Airycanon
Airycanon
21 Sep 2017 · 5 min read
关于 MySQL 的 ONLY_FULL_GROUP_BY
MySQL

关于 MySQL 的 ONLY_FULL_GROUP_BY

定位问题 -------------------------------------------------------------------------------- 最近在使用 Laravel Relationship 查询关联模型时遇到了如下错误: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'echo_

  • Go to the profile of  Airycanon
Airycanon
11 Apr 2017 · 2 min read
Docker 镜像源的修改方式
Docker

Docker 镜像源的修改方式

中国大陆的用户由于某种不可描述的原因,导致从 Docker Hub pull 镜像时,速度慢得难以忍受,我曾经试过 pull 一个 Blender 镜像,一上午都没成功,所以比较靠谱的方法还是修改镜像源的地址,有以下几种方式 (以 USTC 为例): * 直接设置 --registry-mirror 参数,仅对当前的命令有效docker run hello-world --registry-mirror=https://docker.mirrors.ustc.edu.

  • Go to the profile of  Airycanon
Airycanon
17 Mar 2017 · 1 min read
Redis 的 Getshell 问题分析
Redis

Redis 的 Getshell 问题分析

排查错误 -------------------------------------------------------------------------------- 最近测试环境一直没问题的 API 突然报错了,错误信息如下: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set

  • Go to the profile of  Airycanon
Airycanon
28 Dec 2016 · 3 min read
Gitlab Webhook 的一次问题排查
Gitlab

Gitlab Webhook 的一次问题排查

公司的项目中使用了 Gitlab 来管理代码,在使用 Webhook 自动部署时,我发现前端项目经常会在一个莫名其妙的时间触发 build,通过 commit 记录却发现在这个时间并没有任何人提交代码,而由同一个 Webhook 管理的其他后端项目却没有这个问题。 首先对照了 Gitlab 的官方文档 [http://docs.gitlab.com/ce/web_hooks/web_hooks.html] ,其中描述了 event 的几种类型及数据格式,

  • Go to the profile of  Airycanon
Airycanon
7 Sep 2016 · 3 min read
关于 Laravel 验证规则中的 exists 和 unique

关于 Laravel 验证规则中的 exists 和 unique

Laravel 提供了强大的表单验证规则,我在项目中 exists 和 unique 用得比较频繁,参照官方文档写下此文,以便记录下这两个规则的详细用法,以下基于 Laravel 5.4 提供了使用字符串和 Illuminate\Validation\Rule 两种方式生成规则的方法。 exists:table,column -------------------------------------------------------------------------------- 验证字段的值是否存在于数据库指定表的指定列中,如果不存在将会抛出异常,这里是关于 exists 规则的 详细说明 [https://laravel.

  • Go to the profile of  Airycanon
Airycanon
6 May 2016 · 2 min read
MSYS 2 折腾手记

MSYS 2 折腾手记

由于工作中在 Windows 下使用 Git,我接触到了 MinGW,但 MinGW 有一些不便之处,在尝试解决这些问题时,我找到了另一个更方便的环境 MSYS2,关于两者之间的对比,可以看一下 这篇文章 [http://zengrong.net/post/1557.htm]。 安装过程在 官网 [https://msys2.github.io/] 有详细说明,这里记录的是我自己的 MSYS2

  • Go to the profile of  Airycanon
Airycanon
25 Apr 2016 · 3 min read
关于 git submodule

关于 git submodule

最近在汉化 Ghost [https://github.com/tryGhost/ghost] 项目,其中的主题 Casper [https://github.com/TryGhost/Casper] 是一个单独的项目,这时就要用到 git submodule 了,这里以 Ghost 为例,记录我在使用 git submodule 时遇到的问题。 修改 submodule 指向

  • Go to the profile of  Airycanon
Airycanon
27 Feb 2016 · 2 min read
启用 Let's Encrypt 证书

启用 Let's Encrypt 证书

Let's Encrypt [https://letsencrypt.org/] 由 ISRG(Internet Security Research Group,互联网安全研究小组)提供了免费、自动化、开放的证书签发服务,虽然证书只有 90 天有效期,但可以通过定时脚本更新,这里参照 imququ [https://imququ.com/post/letsencrypt-certificate.html] 的文章记录了在 CentOS 7

  • Go to the profile of  Airycanon
Airycanon
26 Feb 2016 · 4 min read
NGINX 配置陷阱和常见错误

NGINX 配置陷阱和常见错误

关于本指南 -------------------------------------------------------------------------------- 这是一篇来自 NGINX 官方 WIKI [https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls] 的指南,由 Github 的 renyidong [https://gist.github.com/renyidong/9b6df7c97d21a83ab2c6] 翻译。 无论新老用户,

  • Go to the profile of  Airycanon
Airycanon
19 Jan 2016 · 11 min read
重装 Shadowsocks 记录

重装 Shadowsocks 记录

我之前使用的是 Linode 的主机,但最近由于某些原因访问缓慢加丢包,因此换了新的主机,仍然使用的是 CentOS 7 x64,Shadowsocks 是必装的,我这里选择的是 Shadowsocks-libev [https://github.com/shadowsocks/shadowsocks-libev](版本号 2.3.3),和 Python 版本略有不同,在安装和配置过程中参考了其他作者的文章,在此表示感谢。 记录如下: 1.下载源码并编译安装

  • Go to the profile of  Airycanon
Airycanon
28 Sep 2015 · 2 min read
CentOS 7 安装 Ghost 记录

CentOS 7 安装 Ghost 记录

由于众所周知的原因,我在 Linode 买了主机,用 Shadowsocks 搭了梯子,而之前阿里云的服务器差不多到期,正好全面迁移到 Linode,把整个迁移过程记录如下,免得下次搬家迷路。 安装 MySQL 由于 CentOS 7 的 yum 源中没有 mysql-sever,需要手动添加 # cd /usr/local # wget http://dev.mysql.com/

  • Go to the profile of  Airycanon
Airycanon
31 Dec 2014 · 3 min read
State 切换时组件的创建销毁策略
Flex

State 切换时组件的创建销毁策略

好久没有写Flex了,今天突然用到了State,隐约记得有两个属性可以控制State切换时组件的创建销毁策略,现记录如下,以防再次失忆。 itemCreationPolicy 属性指定组件的创建策略,该属性值有2个字符串值: * deferred(默认值)首次切换到某状态时,属于该状态的组件会被创建实例。 * immediate 组件在应用启动时创建,但如果组件不属于当前状态,其 creationComplete 事件不会发生,只有首次切换到该组件所属的状态,调用到渲染绘制时,才会发生该事件。 itemDestructionPolicy 组件的销毁策略,该属性值有2个字符串值: * never(默认值)组件一旦创建就不会被自动销毁 * auto 当离开该组件所属的状态时,组件将被自动销毁。

  • Go to the profile of  Airycanon
Airycanon
10 Dec 2014 · 1 min read
使用条件编译控制 swf 的嵌入资源
Flash Builder

使用条件编译控制 swf 的嵌入资源

这是我在一个 Flex 交流群中碰到的问题,某个项目需要针对不同的发行版本使用不同的资源文件,如果把两个版本的资源文件都嵌入,会增大swf的体积,但又不能分为两个项目,应该没人想维护两份相同的代码吧,比较靠谱的方法是使用条件编译参数,具体做法如下: * 在编译参数中添加如下配置: -define=CONFIG::dev,false * 在项目中这样使用: CONFIG::dev { [Embed(source="1.png")] private var background:Class; } CONFIG::dev { [Embed(source=

  • Go to the profile of  Airycanon
Airycanon
10 Dec 2014 · 1 min read
DataGrid 导出 CSV
Flex

DataGrid 导出 CSV

DataGrid 使用第三方库 CSVLib 导出CSV,遇到如下两个问题: * ActionScript 默认的文本编码为 UTF-8,而 CSV 不支持这种编码,导致中文表头在 Excel 中显示为乱码,而用记事本打开正常。解决方法:CSV 导出时用 ByteArray 转码,代码如下: var byte:ByteArray = new ByteArray(); byte.writeMultiByte(result,"gb2312"

  • Go to the profile of  Airycanon
Airycanon
10 Dec 2014 · 1 min read
彻底删除 Flash Builder 的默认工作空间
Flash Builder

彻底删除 Flash Builder 的默认工作空间

使用 Flash Builder 时,第一次启动都在用户目录下生成默认工作空间,例如: C:\Users\Airycanon\Adobe Flash Builder 4.5,4.5 之前的版本,只需切换到自定义的工作空间,删除默认即可,而 4.5 及之后的版本会自动重建该目录,并且工作空间的历史记录及配置文件也存放到该目录中,对于我这种有洁癖的人来说,必须要找到解决办法。 此处以 4.5 为例,

  • Go to the profile of  Airycanon
Airycanon
10 Dec 2014 · 1 min read
Air 应用重新启动的方法

Air 应用重新启动的方法

代码如下: var mgr:ProductManager = new ProductManager("airappinstaller"); mgr.launch("-launch " + NativeApplication.nativeApplication.applicationID + " " + NativeApplication.nativeApplication.publisherID); NativeApplication.nativeApplication.exit(); 注意事项: ProductManager 代码提示是打不出来的,应该是在源码里用 [ExcludeClass] 元标签做了屏蔽,手动导入包即可: import adobe.utils.ProductManager;

  • Go to the profile of  Airycanon
Airycanon
10 Dec 2014 · 1 min read
© 2023 飞舞的卡农. All rights reserved.
Design with by @GodoFredoNinja
No results found
↑ ↓ Navigate up/down
Enter Go to article
Esc Close search