Skip to content

Instantly share code, notes, and snippets.

@guxiaobai
guxiaobai / apartment.md
Created March 30, 2019 07:23
错误警告
[WARNING] - The list of tenants to migrate appears to be empty. This could mean a few things:

          1. You may not have created any, in which case you can ignore this message
          2. You've run `apartment:migrate` directly without loading the Rails environment
            * `apartment:migrate` is now deprecated. Tenants will automatically be migrated with `db:migrate`

        Note that your tenants currently haven't been migrated. You'll need to run `db:migrate` to rectify this.
@guxiaobai
guxiaobai / ant-design-pro.sh
Last active December 13, 2018 11:17
自动化创建ant-design-pro项目
#!/bin/sh
version='2.1.1'
filename=ant-design-pro-${version}
name='skylla_os_web'
echo "Init from ${filename}"
wget -c -O ${filename}.tar.gz https://github.com/ant-design/ant-design-pro/archive/${version}.tar.gz
tar -zxvf ${filename}.tar.gz
@guxiaobai
guxiaobai / ruby_command.md
Created May 20, 2018 05:10
ruby 启动相关

bundle install --path /var/www/jky_api_bear/shared/bundle --without development test --deployment --quiet

bundle exec sidekiqctl stop /var/www/jky_api_bear/shared/tmp/pids/sidekiq-0.pid 10

bundle exec sidekiq --index 0 --pidfile /var/www/jky_api_bear/shared/tmp/pids/sidekiq-0.pid --environment production --logfile /var/www/jky_api_bear/shared/log/sidekiq.log --queue default --config config/sidekiq.yml --concurrency 5 --daemon

bundle exec pumactl -S /var/www/jky_api_bear/shared/tmp/pids/puma.state restart

bundle exec puma -C /var/www/jky_api_bear/shared/puma.rb --daemon

@guxiaobai
guxiaobai / jupyter_getting.md
Created January 26, 2018 03:26
jupyter 使用入门

http://jupyter.org/

安装

sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

build-base python-dev py2-pip pip install jupyter

使用

<?php
// 知识点
// 1. 二进制
// 2. 字节序
padding(2): a/A
4(2): h/H
8(2): c/C
16(4): s/S/n(Big)/v
32(4): l/L/N(Big)/V
i/I
@guxiaobai
guxiaobai / gist:848a8a3d795df1e8d71011704761c537
Last active August 29, 2017 09:50
功能测试 js执行
### Capybara-webkit
apk add apk add qt5-qtwebkit-dev
ENV QMAKE /usr/lib/qt5/bin/qmake
# apk add yarn --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community
测试SSH 执行获取的环境变量
env | ssh user@host remote_program
.bashrc
非交互式登录,退出执行
[ -z "$PS1" ] && return
每次都会执行
/etc/environment