NPM 包发布流程
注册 NPM 账号 点击 注册账号,并完成邮箱验证。 初始化 NPM 项目 123456# 创建项目目录mkdir <project># 进入项目目录cd <project># 初始化项目npm init 执行上述命令,根据提示输入相关信息,完成后目录下会生成 package.json 文件,内容如下: 1234567891011121314{ "name": "demo", "version": "1.0.0", "description": "A demo projcet of npm.", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" ...
Elementary OS 使用心得
快速、开源的 Windows / macOS 替代方案。 安装 VirtualBox Elementary OS 增加第三方软件包源 安装某些软件时需要增加第三方软件包源,如 elementary-tweaks 系统调整工具。使用 add-apt-repository 要先安装以下软件包: 12sudo apt-get install python-software-propertiessudo apt-get install software-properties-common 使用 gdebi 安装 deb 软件包 安装已编译二进制 deb 软件包时,要用到 gdebi 工具: 1sudo apt-get install gdebi 安装 fcitx 小企鹅输入法 安装软件包及配置工具: 123sudo apt-get install fcitx fcitx-config-gtk fcitx-pinyin sudo apt-get install fcitx-table-allsudo apt-get install im-config 此时请重启系统,再通过 i...
MariaDB 数据库安装设置
安装 Ubuntu18 系统 设置 MariaDB 仓库 默认情况下 MariaDB 的包没有在 Ubuntu 仓库中,请参考 MariaDB 官方进行设置 移步。 参考官方设置时请选择有效的仓库镜像地址,下面选择的是清华大学镜像,测试可用。 123sudo apt-get install software-properties-commonsudo apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.its.dal.ca/mariadb/repo/10.4/ubuntu bionic main' 安装 安装过程中要输入 MariaDB 的 root 密码。 12sudo apt updatesudo apt install mariadb-server 基本操作 12345678#...
Cmder 安装与配置
Cmder 安装 下载地址: Cmder Cmder In GitHub 从官网下载 Cmder 解压到任意目录即完成安装。 Cmder 有 mini(6MB)和 full(84MD)两个版本,都是 portable 的,解压即可使用。 外观配置 Font,右键 Tab 栏空白处,弹出菜单选择 Settings,映入眼帘的就是字体设置了。建议使用字体 Input Mono、Inconsolata、Consolas、Courier New。还可以加上中文字体,“Main font” 设置下方的"Alternative font" 添加 CJK 字体,在设置 “Unicode ranges” 成 CJK 的就好了。 Color Schemes,同样是在 Settings 中,左侧树形菜单中选择 Features->Colors,就能来到 Scheme 设置界面。Cmder 自带的 Scheme 很丰富,也可以通过自定 Scheme,应用网络上简洁好看的风格。Github | joonro/ConEmu-Color-Themes 提供了当前流行...
Redmine 项目管理 - 手动安装
环境 系统 Ubuntu18.04 Server LTS 系统没有安装 Apache 或 MySQL 安装 安装APACHE2 123456sudo apt updatesudo apt install apache2 libapache2-mod-passengersudo systemctl stop apache2.servicesudo systemctl start apache2.servicesudo systemctl enable apache2.service 安装数据库MYSQL 12345sudo apt-get install mysql-serversudo systemctl stop mysql.servicesudo systemctl start mysql.servicesudo systemctl enable mysql.service 运行以下命令以保护MYSQL服务器的安全: 12345678sudo mysql_secure_installation New password:...
Yii2 多语言配置 - i18n 国际化
原理 国际化 i18n 是 Yii2 的核心组件,应用 bootstrap 时 i18n 就会被实例化。 1234567891011121314// yii2/base/Application.phppublic function coreComponents(){ return [ 'log' => ['class' => 'yii\log\Dispatcher'], 'view' => ['class' => 'yii\web\View'], 'formatter' => ['class' => 'yii\i18n\Formatter'], 'i18n' => ['class' => 'yii\i18n\I18N'], ...
VirtualBox 实现目录共享
环境 VirtualBox 5.1.30 主机 Windows 10 虚拟机 Ubutnu Sever 16.04 目标 实现主机目录与虚拟机共享,虚拟机搭建测试环境,目录指向共享目录,主机中编码开发。测试环境可以在团队中共享。 安装 VBoxGuestAdditions 准备 安装 kernel headers 和 build tools,执行如下命令。 12# 请使用 root 用户操作apt-get install build-essential module-assistant 安装 将 VBoxGuestAdditions.iso 文件解压上传到虚拟机后安装,VBoxGuestAdditions.iso 文件可以在 VirtualBox 安装目录中找到。 12345# 请使用 root 用户操作cd VBoxGuestAdditionschmod a+x VBoxLinuxAdditions.run./VBoxLinuxAdditions.run # 安装完成后重启虚拟机 目录共享 配置共享目录 挂载共享目录 虚拟机中新建 /www/www...
Composer 入手
简介 官方 中文网 安装 Linux / Unix / OSX 系统 12345678910# 下载安装程序php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"# 校验安装程序,此步可以忽略php -r "if (hash_file('SHA384', 'composer-setup.php') === '55d6ead61b29c7bdee5cccfb50076874187bd9f21f65d8991d46ec5cc90518f447387fb9f76ebae1fbbacf329e583e30') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup....
Yii2 框架入手
简介 Yii 是一个高性能,基于组件的 PHP 框架,用于快速开发现代 Web 应用程序。 名字 Yii (读作 易)在中文里有“极致简单与不断演变”两重含义, 也可看作 Yes It Is! 的缩写。 权威指南 - EN API文档 - EN 中文社区 安装 推荐使用 composer 安装,如果还没有安装 composer 请 移步。 先安装 Composer Asset Plugin 插件: 1composer global require fxp/composer-asset-plugin 选择所需的 Yii2 应用模板进行安装: 1234# Basic composer create-project yiisoft/yii2-app-basic yii-basic# Advancedcomposer create-project yiisoft/yii2-app-advanced yii-advanced 进入项目目录并初始化: 12345678910111213$ ./initYii Application Initialization Tool v1...







