Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| var dbGroups = [ | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Throughput")`).parents('li.dashboard-group'), | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Performance")`).parents('li.dashboard-group'), | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Latency")`).parents('li.dashboard-group'), | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Screenboard Group")`).parents('li.dashboard-group'), | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Saturation")`).parents('li.dashboard-group'), | |
| $(`.dashboard-group-list ul.dashboard-groups li.dashboard-group .dashboard-group-name a.anchor-text:contains("JSRE TF - Healthcheck")`).parents('li.dashbo |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| Install stuff from here: | |
| https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_working | |
| apk add --no-cache linux-headers | |
| apk add --no-cache jemalloc-dev | |
| apk add --no-cache boost-thread | |
| apk add --no-cache boost-dev | |
| apk add --no-cache boost-filesystem | |
| apk add --no-cache boost-program_options | |
| apk add --no-cache boost-regex |
| Upgrading Rails 3.2.12.2 to Rails 4.1.15 | |
| git fetch origin rails_4 | |
| git checkout -b rails_4 FETCH_HEAD | |
| rails_4 branch is rebased often, so git branch -D rails_4; git pull origin rails_4 | |
| MAIN AREAS OF WORK | |
| - everything that has `# FIXME: rails4` comment line in this PR needs to be fixed for `rails_4` branch | |
| - if possible the fix should be applied in `master` branch first, and `rails_4` branch rebased on top of `master` |
| // ANGULAR JS | |
| // JAVASCRIPT DESIGN PATTERNS EXAMPLES | |
| https://plnkr.co/edit/V1WmNSxRD28nXJIfGcpf?p=preview |
| nl -ba config/routes/api_v1.rb | grep -v via | grep match | awk '{print $1}' | pbcopy | |
| a = [43, 46, 50, 51, 54, 55] | |
| File.open('config/routes/api_v1.rb') do |f| | |
| lines = f.readlines | |
| lines.each_with_index do |line, idx| | |
| if a.include?(idx + 1) | |
| lines[idx] = line.sub('match', 'get') | |
| lines[idx] = lines[idx].rstrip + ' # FIXME: rails4' + "\n" |
| #!/usr/bin/env ruby | |
| # bin/setup | |
| require "pathname" | |
| APP_ROOT = Pathname.new File.expand_path("../../", __FILE__) # path to your application root. | |
| Dir.chdir APP_ROOT do | |
| # This script is a starting point to setup your application. Add necessary setup steps to this file: | |
| puts "== Installing dependencies ==" | |
| system "gem install bundler --conservative" | |
| system "bundle check || bundle install" |
| # IPC 1 - IO.pipe to set up the UNIX-pipe-based interprocess communication | |
| in_r, in_w = IO.pipe; out_r, out_w = IO.pipe; err_r, err_w = IO.pipe | |
| pid = spawn('cat -n', in: in_r, out: out_w, err: err_w) | |
| [in_r, out_w, err_w].each(&:close) | |
| in_w.puts("signal to process") | |
| in_w.close |
| #!/usr/bin/env bash | |
| # Run unicorn in the foreground and customize how it runs. | |
| # | |
| # Usage: ./script/start_rails_fg.bash | |
| # ./script/start_rails_fg.bash --help | |
| # supports these env variables: UNICORN_PID | |
| # UNICORN_LISTEN | |
| # UNICORN_STDERR_PATH | |
| # UNICORN_STDOUT_PATH |
| # | |
| find app/models/ -name "*.rb" | xargs grep -h --color -e ^class | cut -d ' ' -f 2 | sort | uniq | while read k; do echo model class: "$k"; grep -r -l -w -m 1 --color "$k" ./app ./config ./lib ./script --exclude-dir=*assets* | head -n 2 | wc -l | grep 1; done |