.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| require 'active_support/all' | |
| require 'chinese_pinyin' | |
| require 'csv' | |
| CSV.open('name_t.csv', 'w') do |csv| | |
| csv << %w[chinese_name last_name first_name] | |
| file = File.new('/Users/guochunzhong/Downloads/name_list.txt') | |
| file.each do |line| | |
| values = [] | |
| name = line.strip |
| def single_convert_to_single_multivalue(single_value) | |
| return '-1' if single_value.nil? || single_value == '' | |
| a = [] | |
| v = single_value.to_i | |
| while v > 0 do | |
| a << v % 2 | |
| v = v / 2 | |
| end |
| tap "adoptopenjdk/openjdk" | |
| tap "bitjourney/self" | |
| tap "homebrew/bundle" | |
| tap "homebrew/cask" | |
| tap "homebrew/core" | |
| tap "homebrew/services" | |
| tap "minio/stable" | |
| tap "puma/puma" | |
| tap "raggi/ale" | |
| brew "aliyun-cli" |
| #!/bin/env ruby | |
| # | |
| # Collects info about the age of all gems in the project | |
| # | |
| require "json" | |
| require "date" | |
| bundle = `bundle list` | |
| yearly_stats = {} |
.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| class Ruby < Formula | |
| desc "Powerful, clean, object-oriented scripting language" | |
| homepage "https://www.ruby-lang.org/" | |
| url "https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.4.tar.xz" | |
| sha256 "1d0034071d675193ca769f64c91827e5f54cb3a7962316a41d5217c7bc6949f0" | |
| revision 1 | |
| bottle do | |
| sha256 "f65d0a31c1149e479ec84c9953ac203d65c0f931b9ab346efae58faed468afda" => :high_sierra | |
| sha256 "97d54b2626c04642997487f06819332c10a6eb62c700a1861d0c3535ce8a3411" => :sierra |
| ActionMailer::Base.class_eval do | |
| class << self | |
| protected | |
| # Override the version from the actionmailer gem in order to not log attachments. | |
| # | |
| def set_payload_for_mail(payload, mail) #:nodoc: | |
| payload[:mailer] = name | |
| payload[:message_id] = mail.message_id | |
| payload[:subject] = mail.subject |
| require 'restforce' | |
| require 'csv' | |
| client = Restforce.new :username => 'admin@bayekeji.com', | |
| :password => '', | |
| :client_id => '3MVG9Z', | |
| :client_secret => '8211' | |
| hsh_ary = client.query("select Id, LastName, DetailAddress__c from account where DetailAddress__c != null") |