This file contains 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: SchemaDefRequirement | |
types: | |
- name: Reference | |
type: record | |
fields: | |
- name: file | |
type: File | |
- name: metadata | |
type: string? |
This file contains 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 React from 'react'; | |
import { | |
ConnectionConfig, | |
GraphQLTaggedNode, | |
RelayPaginationProp, | |
createPaginationContainer, | |
} from 'react-relay'; | |
import InfiniteList from '@bfly/ui/lib/InfiniteList'; | |
export const PAGE_SIZE = 30; |
This file contains 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 PercyClient from 'percy-client'; | |
// https://github.com/percy/percy-webdriverio/blob/master/src/fileSystemAssetLoader.js | |
import FileSystemAssetLoader from './fileSystemAssetLoader'; | |
export default class PercySeleniumClient { | |
constructor({ driver, assetLoaderOpts, ...clientOptions }) { | |
this.percyClient = new PercyClient({ | |
token: process.env.PERCY_TOKEN, | |
apIUrl: process.env.PERCY_API, |
This file contains 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
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} %{$fg_bold[blue]%}k8s:(%{$fg[red]%}$(kubectl config current-context)%{$fg_bold[blue]%}) $(git_prompt_info)' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains 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 json | |
import logging | |
from string import Template | |
from subprocess import CalledProcessError, check_output | |
from time import sleep | |
class PyKubectl(object): | |
def __init__(self, bin='kubectl', extra_args=''): | |
super(PyKubectl, self).__init__() |
This file contains 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
set -eu | |
domain=$1 | |
client_id=$2 | |
connection=$3 | |
username=$4 | |
password=$5 | |
http --json POST https://$domain.auth0.com/oauth/ro client_id=$client_id username=$username password=$password connection=$connection scope="openid organization perms user_type" | jq .id_token -r |pbcopy |
This file contains 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 airflow import DAG | |
from airflow.operators import EcsOperator, PythonOperator | |
from datetime import datetime | |
import os | |
from utils import get_last_run_date | |
# ----------------------------------------------------------------------------- | |
ECS_CLUSTER = os.environ['XXXX_AIRFLOW_ECS_CLUSTER'] |
This file contains 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
USE [master] | |
ALTER DATABASE <DbName> SET SINGLE_USER WITH ROLLBACK IMMEDIATE | |
GO | |
RESTORE DATABASE <DbName> FROM DISK = '<Path to Backup file>' | |
GO |
This file contains 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
/// <summary> | |
/// Deep clones an object using serialization | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="obj">The object to be cloned</param> | |
/// <returns>A copy of the object not sharing any references with the original one</returns> | |
public static T DeepClone<T>(T obj) | |
{ | |
using (var ms = new MemoryStream()) | |
{ |
This file contains 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
using System; | |
using System.Linq; | |
using Ninject; | |
using Ninject.Extensions.Conventions; | |
/// <summary> | |
/// Extensions method to handle plugins | |
/// </summary> | |
public static class NinjectPlugin | |
{ |
NewerOlder