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
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # | |
| # collect_resultsets.rb | |
| # | |
| # Usage: | |
| # ruby collect_resultsets.rb /path/to/folder_with_zips | |
| # | |
| require 'fileutils' |
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
| require 'json' | |
| if ARGV.length != 2 | |
| puts "Usage: ruby jsonl-line-reader.rb <directory> <path:line_number>" | |
| exit 1 | |
| end | |
| directory = ARGV[0] | |
| target_arg = ARGV[1] | |
| if target_arg =~ /^(.*):(\d+)$/ |
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
| require 'json' | |
| require 'json' | |
| require 'pathname' | |
| # Support optional verbose flag as third argument | |
| if ARGV.length < 2 || ARGV.length > 3 |
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 | |
| # Debug script to mimic qlty coverage upload functionality | |
| # Usage: ./debug_coverage_upload.sh <coverage.zip> | |
| set -euo pipefail | |
| # Check dependencies | |
| command -v curl >/dev/null 2>&1 || { echo "Error: curl is required but not installed." >&2; exit 1; } | |
| command -v jq >/dev/null 2>&1 || { echo "Error: jq is required but not installed." >&2; exit 1; } |
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 | |
| # Fetch and prune to get the latest status of remote branches | |
| git fetch --prune | |
| # Iterate over each branch that has a gone status | |
| for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do | |
| # Check if the branch has been fully merged into the current branch | |
| if git branch --merged | grep -w $branch > /dev/null; then | |
| echo "Branch '$branch' is fully merged and can be safely deleted." |
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
| import { Controller } from "@hotwired/stimulus" | |
| export default class extends Controller { | |
| static values = { | |
| wait: Number | |
| } | |
| connect() { | |
| this.refresh = this.debounce(this.refreshNoBounce, this.waitValue || 500); // Default wait time of 500ms if not specified | |
| } |
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.1 | |
| RUN mkdir /app | |
| RUN mkdir /app/bin | |
| WORKDIR /app | |
| ENV PATH=/app/bin:${PATH} | |
| ADD Gemfile Gemfile.lock /app/ | |
| RUN bundle install -j 8 | |
| ADD export-team-memberships.rb /app/bin/ |
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
| #!/usr/bin/env ruby | |
| ## Usage: ./issues.rb REPO_ID [BRANCH] | |
| # | |
| # Outputs CSV formatted list of all issues from most recent snapshot | |
| # of the repo specified. Pipe STDOUT to a file to save to a file. | |
| # | |
| # Branch defaults to "master" if not specified. | |
| # | |
| # e.g. ./issues.rb 5017075af3ea000dc6000740 |
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
| start = 9300 | |
| total = 10460 | |
| index = 0 | |
| failures = Resque::Failure.all(start, total - start);nil | |
| failures.each do |failure| | |
| index += 1 | |
| if failure["payload"]["class"] == "SendWeeklySummary" && failure["retried_at"].nil? | |
| Resque::Failure.requeue(index + start - 1) | |
| end | |
| end;nil |
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
| [1.9.3-p286][17:41][~]$ cat /etc/ssh_config | |
| # $OpenBSD: ssh_config,v 1.26 2010/01/11 01:39:46 dtucker Exp $ | |
| # This is the ssh client system-wide configuration file. See | |
| # ssh_config(5) for more information. This file provides defaults for | |
| # users, and the values can be changed in per-user configuration files | |
| # or on the command line. | |
| # Configuration data is parsed as follows: | |
| # 1. command line options |
NewerOlder