.yarnrc
我们需要在 Rails 项目根目录配置 .yarnrc 告诉 Yarn 我们需要将 npm 的包缓存到 vendor/cache/npm 目录。
registry "https://registry.npm.taobao.org"
lastUpdateCheck 1561690751463
yarn-offline-mirror "./vendor/cache/npm"
yarn-offline-mirror-pruning true| .ease-in-out { | |
| -webkit-transform: scale(0.8); | |
| transform: scale(0.8); | |
| -webkit-transition: all 0.2s ease-in-out; | |
| transition: all 0.2s ease-in-out; | |
| } |
.yarnrc
我们需要在 Rails 项目根目录配置 .yarnrc 告诉 Yarn 我们需要将 npm 的包缓存到 vendor/cache/npm 目录。
registry "https://registry.npm.taobao.org"
lastUpdateCheck 1561690751463
yarn-offline-mirror "./vendor/cache/npm"
yarn-offline-mirror-pruning true| -- Create a final user with password | |
| CREATE USER "readonly-user" WITH PASSWORD '123456'; | |
| -- 选择一个数据库,后面的权限制定是对单个库有效的 | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO "readonly-user"; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO "readonly-user"; | |
| GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO "readonly-user"; |
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: circleci/ruby:2.5.3-node-browsers | |
| environment: | |
| RAILS_ENV: test | |
| DATABASE_URL: postgres://[email protected]:5432/rails-test | |
| - image: circleci/postgres:9.6 | |
| environment: |
| <?php | |
| // Fork from: https://gist.github.com/adamcapriola/11300529 | |
| $sso_secret = 'meow'; | |
| $homeland_url = 'http://your-homeland-app.com'; // Note: No trailing slash! | |
| if ( ! is_user_logged_in() ) { | |
| // Preserve sso and sig parameters | |
| $redirect = add_query_arg(); | |
| // Change %0A to %0B so it's not stripped out in wp_sanitize_redirect |
| <gpx creator="Xcode" version="1.1"> | |
| <wpt lat="37.799" lon="-122.4715"> | |
| <name>PokemonLocation</name> | |
| </wpt> | |
| </gpx> |
| # gem 'thread' | |
| require 'thread/pool' | |
| pool = Thread.pool(20) | |
| total = 10000 | |
| total.times do |i| | |
| pool.process do | |
| stdout = "" | |
| stdout << "\n" | |
| stdout << "Queue #{i}/#{total}" |
| wget http://dianjihe-files.oss-cn-beijing.aliyuncs.com/sdk-1.0.0-SNAPSHOT-jar-with-dependencies.jar | |
| if [ `uname` = "Darwin" ]; then | |
| sudo mv sdk-1.0.0-SNAPSHOT-jar-with-dependencies.jar /Library/Java/Extensions/ | |
| else | |
| sudo mv sdk-1.0.0-SNAPSHOT-jar-with-dependencies.jar /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/ext | |
| fi |
| // Override jquery_ujs data-confirm | |
| // use bootbox.confirm instead of window.confirm | |
| // https://gist.github.com/huacnlee/84d13ea64cc8ccb2d4b0 | |
| $.rails.allowAction = function(element) { | |
| var message = element.attr('data-confirm'); | |
| if (!message) { return true; } | |
| var opts = { | |
| title: "确认提交", | |
| message: message, |
| nohup ssh -n -N -D 0.0.0.0:7002 -p 22 [email protected] 2>&1 & |