json
is a most imporant keyword to reproduce.
{
"key": "hoge"
}
package main | |
import ( | |
"context" | |
"math/rand" | |
"time" | |
) | |
// DummySubscriber is an dummy | |
type DummySubscriber struct { |
package main | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"os/exec" | |
) | |
// copied from internal/common/common.go |
package info.tdoc.spring.example.tracer; | |
import io.opencensus.trace.Tracing; | |
import io.opencensus.trace.Tracer; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.hibernate.resource.jdbc.spi.StatementInspector; | |
import io.opencensus.trace.AttributeValue; | |
import org.springframework.stereotype.Component; |
package main | |
import ( | |
"fmt" | |
"github.com/shirou/gopsutil/disk" | |
) | |
func main() { | |
parts, err := disk.Partitions(true) |
#!/bin/bash | |
# fetch Inventory from SSM | |
INVENTORY=$(aws ssm get-inventory --output json | jq -r '.Entities[].Id' ) | |
# select with Tag.Name by peco | |
EC2=$(aws ec2 describe-instances --instance-ids $INVENTORY --output json --query 'Reservations[].Instances[*].{Id:InstanceId,Name:Tags[?Key==`Name`].Value}' | jq -r '.[][0] | (.Id) + " " + (.Name[0])' | peco) | |
# parse instance-id | |
INSTANCE_ID=$(echo ${EC2} | cut -f 1 -d " ") |
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 |