| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| podlog () { | |
| local pod=($(kubectl get pods --all-namespaces -o wide | fzf | awk '{print $1, $2}')) | |
| echo kubectl logs -n ${pod[1]} ${pod[2]} | |
| kubectl logs -n ${pod[1]} ${pod[2]} | |
| } | |
| podexec () { | |
| local pod=($(kubectl get pods --all-namespaces -o wide | fzf | awk '{print $1, $2}')) | |
| local cmd=${@:-"/bin/sh"} |
| #### Switch a git repo to track a fork origin, with read-only upstream. | |
| # Step 1: Press that "fork" button on github to fork a repo to your account. | |
| # (Don't worry -- if it's a private repo, your fork will still be private | |
| # and should be effectively owned by the original repo's organization.) | |
| # Step 2: Update your local repo | |
| # IMPORTANT: This assumes your local repo is a clone of the ORIGINAL/upstream repo. | |
| ## Add a new 'upstream' remote and add a bogus URL for push commands. |
| #! /usr/bin/env ruby | |
| # encoding: utf-8 | |
| ## PURPOSE: this script will quiet any sidekiq workers it finds, | |
| ## and then shut them down when they are no longer handling jobs | |
| # utility class for logging and running commands | |
| class Utils | |
| require 'open3' | |
| attr_accessor :output |
If you use a monorepo you can place a .buildkite/pipeline.yml in each of the sub repos/folders and
set buildkite to look there using a pipeline command as your first step. Such as:
[[ -f "<SUB_FOLDER>/.buildkite/pipeline.yml" ]] && buildkite-agent pipeline upload <SUB_FOLDER>/.buildkite/pipeline.yml || trueWhere <SUB_FOLDER> is the name of your sub repo / folder.
Unfortunately, if you try to use pre- and post-command hooks this way buildkite won't pick them up, it
Salvaged from Google Cache of http://www.lps-it.fr/blog/20151218-signal-handling-and-ruby.html
December 18, 2015
Linux Ruby
Since version 2.0.0, signal handling in Ruby can be tricky. I bet if you're here, it's because you've seen this error message :
| # I was encountering this exception: Net::SMTPServerBusy: 401 4.1.7 Bad sender address syntax | |
| # First I searched to see if there's any documentation around this issue but didn't find anything, | |
| # so I wrote this snippet to find those invalid characters. | |
| require 'mail' | |
| Mail.defaults do | |
| delivery_method :smtp, { | |
| port: 25, | |
| address: "smtp.mandrillapp.com", |
2015-01-29 Unofficial Relay FAQ
Compilation of questions and answers about Relay from React.js Conf.
Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.
Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).
| inputs = %w[ | |
| CollectionSelectInput | |
| DateTimeInput | |
| FileInput | |
| GroupedCollectionSelectInput | |
| NumericInput | |
| PasswordInput | |
| RangeInput | |
| StringInput | |
| TextInput |
| BEGIN TRANSACTION | |
| -- Remove existing constraints on old table | |
| ALTER TABLE [dbo].[ChatMessages] DROP CONSTRAINT [FK_ChatMessages_ChatRooms_Room_Key] | |
| GO | |
| ALTER TABLE [dbo].[ChatMessages] DROP CONSTRAINT [FK_ChatMessages_ChatUsers_User_Key] | |
| GO | |
| -- Create new table |