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 |
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
OpenSSH_5.9p1, OpenSSL 0.9.8r 8 Feb 2011 | |
debug1: Reading configuration data /Users/noah/.ssh/config | |
debug1: /Users/noah/.ssh/config line 4: Applying options for * | |
debug1: /Users/noah/.ssh/config line 7: Applying options for spintoapp.com | |
debug1: Reading configuration data /etc/ssh_config | |
debug1: /etc/ssh_config line 20: Applying options for * | |
debug2: ssh_connect: needpriv 0 | |
debug1: Connecting to spintoapp.com [208.113.92.242] port 22. | |
debug1: Connection established. | |
debug3: Incorrect RSA1 identifier |
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
{{view Ember.TextField elementId="foo" class="span4" placeholder="bar" valueBinding="person.name"}} |
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 | |
class Array | |
def agreement(other) | |
raise ArgumentError, "Cannot compare arrays of different sizes" if size != other.size | |
other.each_with_index.map do |elem, i| | |
self[i] == elem ? 1 : 0 | |
end | |
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
class MatchEntry | |
include Informal::Model | |
attr_accessor :winner_registration, :loser_registration | |
validate :different_twitter_handles? | |
also_validates :winner_registration, :loser_registration | |
def initialize(options = {}) | |
@winner_registration = options[:winner_registration] | |
@loser_registration = options[:loser_registration] |
NewerOlder