blog's People
blog's Issues
Docker 搭建 gitlab + gitlab-runner
安装docker
下载镜像
docker pull gitlab/gitlab-ce
docker pull gitlab/gitlab-runner
安装 gitlab
docker run --name gitlab --hostname gitlab.example.com -d -p 433:433 -p 10002:80 -p 10003:22 -v ~/gitlab/config:/etc/gitlab -v ~/gitlab/logs:/var/log/gitlab -v ~/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce
帮助文档
gitlab-runner
docker run -d --name gitlab-runner --net=host -v ~/gitlab-runner/config:/etc/gitlab-runner -v ~/gitlab-runner/run/docker.sock:/var/run/docker.sock gitlab/gitlab-runner
docker exec -it gitlab-runner bash
gitlab-runner register
- Enter your GitLab instance URL:
http://localhost:10002/
- Enter the token you obtained to register the Runner:
xxx
(进入 gitlab 项目 => Settings => CI/CD => 展开 Runners settings => Specific Runners 中有 token). - 其它除了选择 excutor 时选择docker+machine其它都默认
JavaScript 调试技巧收集
在Console
中输出带颜色等样式的结果
主要是在 %c
中添加样式
console.important = function(msg) {
console.log('%c%s', 'color:brown;font-weight:bold;text-decoration:underline;', msg);
}
console.important('下一个 bug 呢');
监听函数被调用及其传入的参数
使用 monitor
函数监听指定函数
function fn() {
/*...*/
}
monitor(fn)
fn(1,'a', {name:'fn'}) // function fn called with arguments: 1, a, [object Object]
注意 monitor
需要在 Console
控制台中使用
Mac 通过 adb 连接真机
通过 brew cask 安装 android-sdk
brew cask install android-sdk
配置环境变量
open ~/.bash_profile
在文件结尾加上
export ANDROID_HOME=/usr/local/share/android-sdk
安装 Android target
sdkmanager "platform-tools" "platforms;android-26"
sdkmanager --update
配置 adb
open ~/.bash_profile
在文件结尾加上
export PATH=$PATH:$ANDROID_HOME/platform-tools
找到手机设备的 Product ID(Vendor ID)
修改 adb 配置文件 adb_usb.ini, 没有就创建
open -e ~/.android/adb_usb.ini
输入刚刚的 Product ID(Vendor ID)
检查 mac 是否已发现真机
adb devices
- 手机需开启usb调试
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.