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.Timers; | |
public partial class App : Application | |
{ | |
private Label? debugLabel; | |
private System.Timers.Timer? debugUpdateTimer; | |
private Window? debugWindow; | |
public App() | |
{ |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<TargetFrameworks>net8.0-windows10.0.19041.0</TargetFrameworks> | |
<OutputType>Exe</OutputType> | |
<RootNamespace>SimpleSample</RootNamespace> | |
<UseMaui>false</UseMaui> | |
<SingleProject>true</SingleProject> | |
<ImplicitUsings>enable</ImplicitUsings> | |
<Nullable>enable</Nullable> |
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
require "json" | |
require 'socket' | |
@hostname = Socket.gethostname | |
def register(params) | |
end | |
# Turns one Netflix spectator application feed into many generic metrics | |
# suitable for ingestion in influxdb. |
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
input { | |
http_poller { | |
# Poll the (Netflix project) spectator metrics | |
# from spinnaker services. | |
urls => { | |
clouddriver => "http://localhost:7002/spectator/metrics" | |
fiat => "http://localhost:7003/spectator/metrics" | |
igor => "http://localhost:8088/spectator/metrics" | |
front50 => "http://localhost:8080/spectator/metrics" |
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
[Unit] | |
Description=Announce Postgres Master | |
BindsTo=postgres-master.service | |
After=postgres-master.service | |
[Service] | |
ExecStart=/bin/sh -c "while true; do etcdctl set /services/postgres/master '{ \"host\": \"%H\", \"port\": 80, \"version\": \"52c7248a14\", \"ip\": \"'`ifconfig docker0 | awk '/\<inet\>/ { print $2}'`'\" }' --ttl 60;sleep 45;done" | |
ExecStop=/usr/bin/etcdctl rm /services/postgres/master | |
[X-Fleet] |
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
[Unit] | |
Description=Postgres Master | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
ExecStartPre=-/usr/bin/docker kill postgres-master | |
ExecStartPre=-/usr/bin/docker rm postgres-master | |
ExecStartPre=/usr/bin/docker pull postgres:9 |
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
http://0value.com/my-Go-centric-Vim-setup | |
http://gmarik.info/blog/2010/10/08/ctags-on-OSX | |
set completeopt+=longest | |
set nu |
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
protected abstract static class ListComparer<T> { | |
protected abstract Comparable compareBy(T item); | |
protected boolean equalLists(List<T> result, List<T> expected) { | |
if (result == null || expected == null) { | |
return result == null && expected == null; | |
} | |
Comparator<T> comparator = new Comparator<T>() { |
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
------------------------------------------------------------------------------- | |
Test set: com.fasterxml.jackson.datatype.hibernate4.LazyLoadingTest | |
------------------------------------------------------------------------------- | |
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.235 sec <<< FAILURE! | |
testGetCustomerJson(com.fasterxml.jackson.datatype.hibernate4.LazyLoadingTest) Time elapsed: 0.235 sec <<< FAILURE! | |
junit.framework.AssertionFailedError: null | |
at junit.framework.Assert.fail(Assert.java:47) | |
at junit.framework.Assert.assertTrue(Assert.java:20) | |
at junit.framework.Assert.assertFalse(Assert.java:34) | |
at junit.framework.Assert.assertFalse(Assert.java:41) |