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 | |
| # Git Aliases Setup Script from https://github.com/pivotal/workstation-setup/tree/main/scripts/opt-in | |
| # Basic Commands | |
| # Shows repository status | |
| git config --global alias.gst "status" | |
| # Shows repository status (alternative) | |
| git config --global alias.st "status" | |
| # Shows changes in working directory | |
| git config --global alias.di "diff" |
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
| [ | |
| { | |
| "openapi": "3.0.1", | |
| "info": { | |
| "title": "agifyApis", | |
| "description": "defaultDescription", | |
| "version": "0.1" | |
| }, | |
| "servers": [ | |
| { |
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
| package my.package; | |
| import org.junit.jupiter.params.ParameterizedTest; | |
| import org.junit.jupiter.params.provider.MethodSource; | |
| import org.openqa.selenium.WebDriver; | |
| class CrossBrowserTest { | |
| @ParameterizedTest | |
| @MethodSource( "my.package.WebDriverFactory#drivers" ) |
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 | |
| set -uo pipefail | |
| function check_s3_status() { | |
| S3_BUCKET_STATUS=$(curl -I https://my-buckets.s3.amazonaws.com | head -n 1) | |
| [[ ${S3_BUCKET_STATUS} == *"HTTP/1.1 200 OK"* ]] && echo "OK with code: ${S3_BUCKET_STATUS}" && return 0 | |
| echo "Failed with code: ${S3_BUCKET_STATUS}" | |
| return 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
| function onInstall(e) { | |
| onOpen(e); | |
| } | |
| function onOpen(e) { | |
| var jsonExport = [{name: "Export as JSON translation files", functionName: "runJSONExport"}]; | |
| SpreadsheetApp.getActiveSpreadsheet().addMenu("json", jsonExport); | |
| } | |
| function runJSONExport() { |
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 java.math.BigInteger; | |
| public class TailCallRecursion { | |
| @FunctionalInterface | |
| public interface Trampoline<V> { | |
| V trampoline(); | |
| default V call() { |
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
| RubyVM::InstructionSequence.compile_option = { | |
| tailcall_optimization: true, | |
| trace_instruction: false | |
| } | |
| eval <<END | |
| def factorial_tailcall(n, accumulated=1) | |
| return accumulated if n <= 1 | |
| factorial_tailcall(n - 1, n * accumulated) | |
| 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
| #import <objc/runtime.h> | |
| @implementation UIViewController (Tracking) | |
| + (void)load { | |
| static dispatch_once_t onceToken; | |
| dispatch_once(&onceToken, ^{ | |
| Class class = [self class]; |