import (
_ "net/http/pprof"
"net/http"
)
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 main is an example of how handler pattern works in golang. | |
// | |
// At first you will need some sort of start point. To do this we create | |
// ExampleHandler interface, this interface has a trigger method that will | |
// execute the chain, in his case is RunExample, it accepts a writer, and a | |
// custom input object, as you see there is an out and an in parameter. | |
// | |
// We could work like this you can create multiple ExampleHandlers in a helper | |
// function and call them on in another. But this is not very handy and it smells | |
// |
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 main | |
import ( | |
"os" | |
"path/filepath" | |
"time" | |
corev1 "k8s.io/api/core/v1" | |
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | |
"k8s.io/apimachinery/pkg/runtime" |
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
KEY=$(xauth list |grep $(hostname) | awk '{ print $3 }' | head -n 1) | |
DCK_HOST=docker-skype | |
xauth add $DCK_HOST/unix:0 . $KEY | |
docker run -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix \ | |
-v $HOME/.Xauthority:/tmp/.Xauthority \ | |
-v /dev/snd:/dev/snd \ | |
-e DISPLAY=unix$DISPLAY \ | |
-e XAUTHORITY=/tmp/.Xauthority \ | |
-h $DCK_HOST \ |
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
# Copyright (c) 2011, Xabier (slok) Larrakoetxea | |
# Copyright (c) 2011, Iraide (Sharem) Diaz | |
# | |
# 3 clause/New BSD license: | |
# opensource: http://www.opensource.org/licenses/BSD-3-Clause | |
# wikipedia: http://en.wikipedia.org/wiki/BSD_licenses | |
# | |
#----------------------------------------------------------------------- | |
# This script allows to upload to Fileserve with FTP various files at the same time | |
# |
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 main | |
import ( | |
"bytes" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"net/url" |
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
version: "prometheus/v1" | |
service: "myservice" | |
labels: | |
owner: "myteam" | |
tier: "2" | |
slos: | |
# We allow failing (5xx and 429) 1 request every 1000 requests (99.9%). | |
- name: "requests-availability" | |
objective: 99.9 | |
description: "Common SLO based on availability for HTTP request responses." |
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
-------------- | |
Raptor2-2.0.0 | |
-------------- | |
[For GRDDL requieres libxml2 and libxslt] | |
$ tar xvf ./raptor2-2.0.0.tar.gz | |
$ cd ./raptor2-2.0.0 | |
$ ./configure --prefix=/usr --libdir=/usr/lib64 | |
$ make | |
$ make check | |
$ cd ./examples |
NewerOlder