Skip to content

Instantly share code, notes, and snippets.

View tonyvince's full-sized avatar
🏠
Working from home

Tony Vincent tonyvince

🏠
Working from home
  • Berlin, Germany
View GitHub Profile
# .github/config/rubocop_linter_action.yml
# Description: The scope of code that Rubocop should lint. Use this if you only want to lint changed files. If this is not set
# or not equal to 'modified', Rubocop is run against the entire codebase. Note that this will not work on the master branch.
# Valid options: 'modified'
# Default: nil
check_scope: 'modified'
# .github/workflows/rubocop.yml
name: RuboCop
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest

Keybase proof

I hereby claim:

  • I am tonyvince on github.
  • I am tonyvincent (https://keybase.io/tonyvincent) on keybase.
  • I have a public key ASCU_r1qE-9blWC_E0651tUwbCcEUqL6ekE7aBXAr5tUBQo

To claim this, I am signing this object:

# Trip Optimization (maximize your layover)
# You have a [X]-hour layover in Paris and want to book some Trips. You prefer to book as few Trips as possible to enjoy the last
# [X] hours with minimum context switch. How will you arrange your time? Assuming that there is no time cost for transportation
# between Trips.
# Input
# An array of Trips durations (hours). e.g. [1, 3, 6]
# Total remaining hours. e.g. 15
# Output:
# Minimum number of purchases. e.g. 3 (6 + 6 + 3 = 15)
# If there is no way to fill total remaining hours, return -1.
@tonyvince
tonyvince / travis_ci_restart_build.rb
Last active May 14, 2020 12:42
Ruby script to automatically restart a travis-ci build
# The script below checks a given build is running or not
# and restarts the build of not running
#
# This script is used to run a particular build for the duration of a day
# to catch all randombly failing tests
#
# To get access token, see here https://github.com/travis-ci/travis.rb#token
# ================================
# for private repositories users
{"version":1,"resource":"file:///Users/tony/Projects/hivecore/app/jobs/ox/user_actions/save_packing_confirmation_job.rb","entries":[{"id":"6HxL.rb","timestamp":1657784352688},{"id":"hfY8.rb","timestamp":1657784392981},{"id":"FiOv.rb","timestamp":1657784405228},{"id":"5cna.rb","timestamp":1657784441759},{"id":"gVob.rb","timestamp":1657784452111},{"id":"8RtR.rb","timestamp":1657784468723}]}