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
# Turns the number of seconds elapsed into an appropriate stringified description | |
function seconds_to_human_readable() | |
{ | |
local SECONDS=$1 | |
if [ ${SECONDS} -lt 1 ]; then | |
RESULT="just now" | |
elif [ ${SECONDS} -lt 60 ]; then | |
RESULT="${SECONDS} seconds" | |
elif [ ${SECONDS} -lt 3600 ]; then |
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
#!/usr/bin/env bash | |
# https://stackoverflow.com/a/39644782/1273175 | |
((!$#)) && echo 'Must provide a stash name!' && exit 1 | |
if ! $( git status --porcelain | grep -v '??' | grep -E '^[^ ]' --silent ); then | |
echo 'No staged changes detected!' | |
exit 1 | |
fi |
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
#!/usr/bin/env bash | |
readonly target_swift_toolchain_name='swift-4.1.3-RELEASE.xctoolchain' | |
readonly toolchain_plist_file_path="/Library/Developer/Toolchains/${target_swift_toolchain_name}/Info.plist" | |
if [ ! -f "${toolchain_plist_file_path}" ]; then | |
echo | |
echo "ERROR: no toolchain found at [${toolchain_plist_file_path}]" | |
exit 1 | |
fi |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
readonly temp_dir=$( mktemp -d ) | |
# sudo kubectl get pods | |
# NAME READY STATUS RESTARTS AGE | |
# azure-vote-back-655476c7f7-gvg7b 1/1 Running 0 24m | |
# azure-vote-front-7f98fd48d4-8fkcd 1/1 Running 0 18m |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFrameworks>netstandard2.0;Xamarin.iOS10;MonoAndroid81;</TargetFrameworks> | |
<SynchReleaseVersion>false</SynchReleaseVersion> | |
<DefineConstants>$(DefineConstants);</DefineConstants> | |
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | |
<Configurations>Debug;Release;</Configurations> | |
</PropertyGroup> | |
<PropertyGroup Condition=" '$(Configuration)'=='Debug' "> |
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
evaluating file '/nix/store/1jz25hcma179wbpi56blgajw47n5kgqd-nix-2.2.1/share/nix/corepkgs/derivation.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/default.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/lib/minver.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/pkgs/top-level/impure.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/pkgs/top-level/default.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/pkgs/stdenv/booter.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/lib/default.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519cpn4g9zf18fp8yn4y-nixpkgs-19.03pre169106.1a88aa9e0cd/nixpkgs/lib/fixed-points.nix' | |
evaluating file '/nix/store/7jxnk6i5iqln519 |
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
# nginx Configuration File | |
# http://wiki.nginx.org/Configuration | |
# Run as a less privileged user for security reasons. | |
user www-data www-users; | |
# How many worker threads to run; | |
# "auto" sets it to the number of CPU cores available in the system, and | |
# offers the best performance. Don't set it higher than the number of CPU | |
# cores if changing this parameter. |
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 { Injectable, Inject } from '@angular/core'; | |
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http'; | |
import { Observable } from 'rxjs'; | |
import { INgTokenAuthService } from './ng-token-auth'; | |
@Injectable() | |
export class TokenAuthInterceptor implements HttpInterceptor { | |
constructor( |
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
swagger: '2.0' | |
info: | |
description: API Documentation | |
version: 2.0.0 | |
title: TheGamesDB API | |
license: | |
name: GNU General Public License v3.0 | |
url: https://github.com/TheGamesDB/TheGamesDBv2/blob/master/LICENSE | |
# tags are used for organizing operations |
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
const chromium = require('chrome-aws-lambda'); | |
const chalk = require('chalk'); | |
const USERNAME = process.env.USERNAME; | |
const PASSWORD = process.env.PASSWORD; | |
const DEFAULT_TIMEOUT = 5000; | |
const hl_info = chalk.bold.white; | |
const info = chalk.gray; | |
const positive = chalk.green; |
OlderNewer