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 "net" | |
import "bufio" | |
func main() { | |
c,err := net.Dial("unix", "/tmp/echo.sock") | |
if err != nil { | |
panic(err.Error()) | |
} |
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 "net" | |
import "bufio" | |
import "time" | |
func echoServer(c net.Conn) { | |
buffrw := bufio.NewWriter(c) | |
for { | |
_, err := buffrw.WriteString("Test\n") |
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 | |
set -e | |
function waitfor { | |
SEC=$1 | |
MSG=$2 | |
while [ $SEC -gt 0 ]; do | |
printf "\r$MSG $SEC \r" | |
sleep 1 | |
SEC=$((SEC - 1)) |
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
# Mount an external volume on /irssi for persistent storage | |
FROM ubuntu:14.04 | |
MAINTAINER Bart Meuris | |
RUN apt-get update && \ | |
apt-get -y install irssi irssi-scripts && \ | |
useradd irssi && \ | |
mkdir -p /home/irssi && \ | |
chown -R irssi:irssi /home/irssi && \ |
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
### Keybase proof | |
I hereby claim: | |
* I am bartmeuris on github. | |
* I am bartmeuris (https://keybase.io/bartmeuris) on keybase. | |
* I have a public key whose fingerprint is A603 7806 2CEE E930 061B 46FB 0FA4 CF8D C34E 135C | |
To claim this, I am signing this object: |
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
FROM ubuntu:14.04 | |
MAINTAINER Bart Meuris | |
RUN apt-get update && \ | |
apt-get -y install irssi irssi-scripts && \ | |
useradd irssi && \ | |
mkdir -p /home/irssi && \ | |
chown -R irssi:irssi /home/irssi && \ | |
mkdir /config && \ | |
chown irssi:irssi /config && \ |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
require 'json' | |
def load_json_default(filename, defaultstruct) | |
if File.exist?(filename) | |
json = File.read(filename) | |
data = JSON.parse(json) | |
else | |
data = defaultstruct |
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
user@win10:~/proj$ time ./test.sh > /dev/null | |
real 2m17.271s | |
user 0m5.406s | |
sys 2m16.094s | |
user@win10:~/proj$ |
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
$ ./vsphere-influxdb-go -debug | |
2016/11/16 15:08:08 Starting : vsphere-influxdb-go | |
2016/11/16 15:08:08 connecting to vcenter: x.x.x.x | |
2016/11/16 15:08:08 Successfully connected to Influx | |
2016/11/16 15:08:08 Querying vcenter | |
2016/11/16 15:08:08 Setting up query inventory of vcenter: x.x.x.x | |
2016/11/16 15:08:08 connecting to vcenter: x.x.x.x | |
([]types.ManagedObjectReference) (len=40 cap=40) { | |
(types.ManagedObjectReference) HostSystem:host-163, |
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
{ | |
"__inputs": [ | |
{ | |
"name": "DS_TELEGRAF", | |
"label": "telegraf", | |
"description": "", | |
"type": "datasource", | |
"pluginId": "influxdb", | |
"pluginName": "InfluxDB" | |
} |
OlderNewer