基于 Docker 安装 GitLab 和 GitLab-Runner 发表于 2019-12-13 分类于 技术 安装 docker 并拉取相关镜像 gitlab/gitlab-ce gitlab/gitlab-runner 12docker pull gitlab/gitlab-cedocker pull gitlab/gitlab-runner 运行 docker 镜像 GitLab CE 12345678910docker run -d \ --name gitlab \ --restart always \ -p 127.0.0.1:50080:80 \ -p 127.0.0.1:50022:22 \ -m 2048m \ -v /opt/docker/gitlab/config:/etc/gitlab \ -v /opt/docker/gitlab/logs:/var/log/gitlab \ -v /opt/docker/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest 12345678docker run -d \ --name gitlab-runner \ --link gitlab:gitlab \ --restart always \ -m 1024m \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /opt/docker/gitlab-runner/config:/etc/gitlab-runner \ gitlab/gitlab-runner:latest GitLab EE 1234567891011docker run -d \ --name gitlab \ --restart always \ -p 127.0.0.1:50080:80 \ -p 127.0.0.1:50022:22 \ -m 2048m \ -v /opt/docker/gitlab/config:/etc/gitlab \ -v /opt/docker/gitlab/logs:/var/log/gitlab \ -v /opt/docker/gitlab/data:/var/opt/gitlab \ -v /opt/docker/gitlab/.license_encryption_key.pub:/opt/gitlab/embedded/service/gitlab-rails/.license_encryption_key.pub \ gitlab/gitlab-ee:latest 注册 gitlab-runner123docker exec -it gitlab-runner gitlab-runner register# 之后访问地址 http://code.52xckl.cn/admin/runners 配置即可# 配置地址可以使用 http://gitlab 内网 参考文档 gitlab gitlab-runner
GitKraken Crack 发表于 2019-12-12 分类于 技术 安装 npm 以及 asar12# download: https://nodejs.org/en/npm i -g asar 解压 GitKraken 的资源文件12# 安装目录\gitkraken\app-x.x.x\resourcesasar extract ./app.asar ./tmp/ 修改 static/index.js 文件(注意备份)下面是 v6.5.1 之后的版本 123456789101112131415161718192021222324252627282930--- static/index.js+++ static/index.js@@ -1,6 +1,27 @@ // Warning: You almost certainly do *not* want to edit this code - // instead, you want to edit src/js/main.jsx instead++function PatchSnapshot() {+ const edmLiteD = snapshotResult.customRequire('@axosoft/edm-lite-d/src/d.js');+ snapshotResult.customRequire.cache['@axosoft/edm-lite-d/src/d.js'] = {+ exports: function() {+ let response = JSON.parse(edmLiteD(...arguments).toString('utf8'));+ if ('licenseExpiresAt' in response || 'licensedFeatures' in response) {+ response = {+ ...response,+ availableTrialDays: null,+ licenseExpiresAt: 8640000000000000,+ licensedFeatures: ['pro']+ };+ }+ return Buffer.from(JSON.stringify(response), 'utf8');+ }+ };+}+ (function() {+ PatchSnapshot();+ const Perf = snapshotResult.customRequire('./src/js/utils/Performance.js'); Perf.timeEnd('loading monaco scripts'); Perf.time('index.js pre-bootstrap'); 下面是 v6.5.1 之前的版本 1234567891011121314151617181920212223242526272829303132--- static/index.js+++ static/index.js@@ -1,7 +1,29 @@ // Warning: You almost certainly do *not* want to edit this code - // instead, you want to edit src/js/main.jsx instead+function XhrPromiseReduxProxy() {+ const xhrPromiseRedux = snapshotResult.customRequire(+ 'xhr-promise-redux/dist/index.js'+ );+ xhrPromiseRedux._post = xhrPromiseRedux.post;+ xhrPromiseRedux.post = async (url, options) => {+ const res = await xhrPromiseRedux._post(url, options);+ if (url.match(/https:\/\/.*api.gitkraken.com\/phone-home/)) {+ res.body.availableTrialDays = null;+ res.body.code = 0;+ res.body.features = [];+ res.body.individualAccessState = null;+ res.body.licenseExpiresAt = 8640000000000000;+ res.body.licensedFeatures = ['pro'];+ res.body.proAccessState = null;+ }+ return res;+ };+}+ (function() {+ XhrPromiseReduxProxy();+ const Perf = snapshotResult.customRequire('./src/js/utils/Performance.js'); Perf.timeEnd('loading monaco scripts'); Perf.time('index.js pre-bootstrap'); 重新打包1asar pack ./tmp/ app.asar
Samba 文件共享 发表于 2019-11-28 分类于 技术 安装1apt install samba 配置新建系统用户1useradd -M -s /sbin/nologin ${user} 新建 samba 用户1smbpasswd -a ${user} 修改 samba 配置文件在文件末尾添加如下配置: 123456[Samba] comment = Samba path = /opt/samba guest ok = no read only = no browseable = yes 不要忘了授予 ${user} /opt/samba 目录权限 重启 samba 服务1systemctl restart smbd.service
简单介绍 发表于 2019-11-20 博客使用 Hexo,搭建在 Github Pages,源代码部署在 GitLab 上,使用相关 CI 自动化部署。 自动化部署_config.yml1234567deploy: type: git repo: https://${username}:${token|password}@github.com/starudream/blog.git branch: master message: update name: ${name} email: ${email} .gitlab-ci.yml12345678910111213141516171819image: node:lts-alpinegithub: stage: publish script: - apk add --no-cache git - git config --global user.name ${name} - git config --global user.email ${email} - git clone https://${name}:${token|password}@github.com/starudream/blog.git .deploy_git - npm install && npm install hexo-cli -g && hexo clean && hexo deploy only: - masterstages: - publishcache: paths: - node_modules