json
is a most imporant keyword to reproduce.
{
"key": "hoge"
}
package main | |
import ( | |
"fmt" | |
"net" | |
"github.com/shirou/gopsutil/cpu" | |
"github.com/shirou/gopsutil/disk" | |
"github.com/shirou/gopsutil/host" | |
"github.com/shirou/gopsutil/mem" |
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/shirou/gopsutil/net" | |
) | |
func run() error { |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import division, print_function, absolute_import | |
# python contextanize.py *.go | |
# after that, goimports -w is required to add import "context" | |
# | |
# ex | |
# + return TimesWithContext(context.Background()) | |
# +} |
#!/bin/bash | |
# | |
# | |
# | |
# Start on runlevels 3, 4 and 5. Start late, kill early. | |
# chkconfig: 345 95 05 | |
# | |
# | |
#!/bin/bash |
version: '2' | |
services: | |
postgres: | |
image: postgres:9.5.2 | |
volumes: | |
- $PWD/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | |
ports: | |
- "45432:5432" | |
pgweb: |
go test -bench . -benchmem | |
BenchmarkOk-4 2000000000 0.32 ns/op 0 B/op 0 allocs/op | |
BenchmarkErr-4 2000000000 0.32 ns/op 0 B/op 0 allocs/op |
# -*- coding: utf-8 -*- | |
# | |
# rst2pdf test documentation build configuration file, created by | |
# sphinx-quickstart on Fri Aug 18 10:40:42 2017. | |
# | |
# This file is execfile()d with the current directory set to its | |
# containing dir. | |
# | |
# Note that not all possible configuration values are present in this | |
# autogenerated file. |
const CDP = require('chrome-remote-interface'); | |
CDP((client) => { | |
// extract domains | |
const {Network, Page, Input} = client; | |
// setup handlers | |
Network.requestWillBeSent((params) => { | |
console.log(params.request.url); | |
}); | |
Page.loadEventFired(() => { |
# consumer.py | |
# pip install kafka-python すること | |
from kafka import KafkaConsumer, TopicPartition | |
consumer = KafkaConsumer(bootstrap_servers='localhost:32774') # docker ps でport番号しらべる | |
consumer.subscribe(['foobar']) | |
for msg in consumer: | |
print(msg) |