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
# Pipe YAML or JSON, optionally query it, and display as colorized YAML in less | |
function y() { yq -C "$@" | less -R; } | |
function yj() { yq -C -p=j -o=y "$@" | less -R; } |
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
for p in $(gcloud projects list --format json|yq -p=j '.[]|.projectId'); | |
do | |
PRJ=$p gcloud compute instances list --format json --project $p |yq -p=j '.[]|[env(PRJ), .status, .name]|@csv'; | |
done |
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
#!/bin/bash | |
# Input: ./extract_kubecfg_cert.sh my-cluster-name username | |
# Output: ./my-cluster-name-ca.crt ./username.crt ./username.key | |
# Exit on error | |
abort(){ | |
echo $1 && exit 1 | |
} | |
# Prerequistes |
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
namespace Radar.Common.WebServer.Api.Controllers | |
{ | |
using System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; |
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
// Original idea: http://stackoverflow.com/questions/9565889/get-the-ip-address-of-the-remote-host | |
using System.Net.Http; | |
using System.ServiceModel.Channels; | |
using System.Web; | |
namespace CrowSoftware.Api | |
{ | |
public static class HttpRequestMessageHelper | |
{ |
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
@echo off | |
rem ********************************************************************************* | |
rem * | |
rem * See http://is.gd/lAht03 | |
rem * | |
rem * Update ASP.NET MVC4 nightly build in the GAC | |
rem * | |
rem * Run from the solution's packages folder. | |
rem * | |
rem * nightly-build-to-gac.cmd [build-no-filter] |
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
namespace NLog.Targets.Wrappers | |
{ | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using NLog.Common; | |
/// <summary> | |
/// A target that places events in a fixed size FIFO queue and only logs the most recent events | |
/// when an event of sufficient severity is logged. This provides context to more severe events | |
/// without filling up the logs when no severe events are occurring. |
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
package com.necam.eadd.jira.plugin.report.magicchart; | |
import java.awt.BasicStroke; | |
import java.awt.Color; | |
import org.apache.log4j.Level; | |
import org.apache.log4j.Logger; | |
import org.jfree.chart.JFreeChart; | |
import org.jfree.chart.axis.AxisLocation; |