This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function main() { | |
| const data = JSON.parse(fetchData()); | |
| sheet().clear({ formatOnly: false, contentsOnly: true }); | |
| sheet().clearNotes(); | |
| sheet().appendRow( | |
| [ | |
| "Symbol", | |
| "Price", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| name, | |
| symbol, | |
| price, | |
| price_change_percent_1d, | |
| price_change_percent_1m, | |
| price_change_percent_3m, | |
| price_change_percent_6m, | |
| price_change_percent_ytd, | |
| moving_avg_50d_percent_diff, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '50 12 * * 1-5' # free edition mon-fri 8:50 ET | |
| - cron: '55 12 * * 1-5' # premium morning mon-fri 8:55 ET |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "2" | |
| options: | |
| verbose: true | |
| syncs: | |
| rails-app-sync: | |
| src: './' | |
| sync_strategy: 'native_osx' | |
| sync_excludes: ['.git/', '*.log'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3' | |
| services: | |
| redis-docker: | |
| image: redis:3 | |
| container_name: redis-docker | |
| memcached-docker: | |
| image: memcached:1.5 | |
| container_name: memcached-docker | |
| mysql-docker: | |
| container_name: mysql-docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.2 | |
| RUN apt-get -y update | |
| RUN apt-get -y install zlib1g-dev libssl-dev libreadline6-dev libyaml-dev gawk autoconf libgdbm-dev libncurses5-dev automake libtool bison libffi-dev openssl links rsync bc | |
| RUN apt-get -y install redis-server memcached default-jre build-essential curl nodejs npm mysql-client libmysqlclient-dev git vim libxml2 libxml2-dev libxslt-dev openssl libcurl4-openssl-dev libmagickcore-dev libmagickwand-dev imagemagick | |
| RUN mkdir -p /app | |
| WORKDIR /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rails: rails s -p 3000 -b 0.0.0.0 | |
| sidekiq: sidekiq -q cache_control -q generic -q data_import | |
| solr: sunspot-solr run --data-directory=./solr4/data --solr-home=./solr4 --max-memory=1512M --port=8982 | |
| compass: compass watch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| bundle check || bundle install --jobs 20 --retry 5 --system --binstubs="$BUNDLE_BIN" | |
| if [ -f tmp/pids/server.pid ]; then | |
| rm -f tmp/pids/server.pid | |
| fi | |
| bundle exec foreman start -f procfile_docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i = 0 | |
| Sidekiq::ScheduledSet.new.each do |job| | |
| next unless job.klass.match(/WeeklyRecommendationPushWorker/) | |
| p i += 1 | |
| count = Sidekiq.redis do |conn| | |
| conn.zremrangebyscore("schedule", job.score, job.score) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cond = "orientation='landscape' and status=1 and place_type != 'User'" | |
| Media.where(cond).find_each do |media| | |
| begin | |
| image = Media.image_from_blob(media.fetch_original) | |
| p "Media #{media.id} has different width: #{image.columns != media.width} - height: #{image.rows != media.height}" | |
| if image.columns != media.width | |
| p "Recuting media: #{media.id}" | |
| media.recut | |
| Rails.cache.delete("place_images_#{media.place_type}_#{media.place_id}_topic") | |
| end |
NewerOlder