Skip to content

Instantly share code, notes, and snippets.

View int128's full-sized avatar

Hidetake Iwata int128

View GitHub Profile
@vmihailenco
vmihailenco / proxy.go
Created November 20, 2011 15:22
Simple TCP proxy in Golang
package main
import (
"bytes"
"encoding/hex"
"flag"
"fmt"
"io"
"log"
"net"
@reizist
reizist / ls_s3.py
Last active October 5, 2023 06:33
run aws command on gcp with keyless"
import boto3
import json
import os
from botocore.credentials import Credentials
from google.oauth2 import id_token
from google.oauth2 import service_account
import google.auth
import google.auth.transport.requests
@voluntas
voluntas / new_to_mqtt.rst
Last active October 2, 2023 06:26
初めての MQTT
@ymmt2005
ymmt2005 / neco_skills.md
Last active September 24, 2023 10:59
Neco プロジェクトのスキルシート

Neco プロジェクトのスキルチェックシート

Neco は大量の物理サーバーを効率的に管理・運用することを目的とした開発プロジェクトです。 Kubernetes を中心に高度な自律運用の実現を目指しています。

本文書はプロジェクトに参加しているメンバーが身に着けている要素技術を並べたものです。

応募時点ですべてを身に着けている必要はまったくありません。 社内にはチュートリアル資料が多数用意されていますので、必要に応じて学べます。

@mariussoutier
mariussoutier / Mail.scala
Created August 23, 2012 12:13
Sending mails fluently in Scala
package object mail {
implicit def stringToSeq(single: String): Seq[String] = Seq(single)
implicit def liftToOption[T](t: T): Option[T] = Some(t)
sealed abstract class MailType
case object Plain extends MailType
case object Rich extends MailType
case object MultiPart extends MailType
@ymnk
ymnk / AES.java
Last active July 20, 2023 15:54
JSch examples
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/**
* This program will demonstrate how to use "aes128-cbc".
*
*/
import com.jcraft.jsch.*;
import java.awt.*;
import javax.swing.*;
public class AES{
@jamesrr39
jamesrr39 / Golang program stdin stdout interaction.md
Last active July 12, 2023 18:21
Using stdout and stdin from other programs in Golang

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@shreyaskarnik
shreyaskarnik / Instructions.md
Last active March 24, 2023 15:35
Route Docker Logs to ELK Stack
  • With Docker 1.8.0 shipped new log-driver for GELF via UDP, this means that the logs from Docker Container(s) can be shipped directly to the ELK stack for further analysis.
  • This tutorial will illustrate how to use the GELF log-driver with Docker engine.
  • Step 1: Setup ELK Stack:
    • docker run -d --name es elasticsearch
    • docker run -d --name logstash --link es:elasticsearch logstash -v /tmp/logstash.conf:/config-dir/logstash.conf logstash logstash -f /config-dir/logstash.conf
    • Note the config for Logstash can be found at this link
    • docker run --link es:elasticsearch -d kibana
  • Once the ELK stack is up now let's fire up our nginx container which ships its logs to ELK stack.
  • LOGSTASH_ADDRESS=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logstash)
  • `docker run -d --net=host --log-driver=gelf --log-opt gelf-address=u
@yuya-takeyama
yuya-takeyama / README.md
Last active January 14, 2023 11:15
DevOps な組織で Monorepo から Argo CD を使って Kubernetes にデプロイする仕組みの草案

概要

image

前提条件

  • アプリケーションは Mono Repo 上にサブディレクトリとして数十ほど存在
  • 各アプリケーションは独立してリリース可能とする
    • そのためにリリースブランチ等には */release といった形でそのアプリケーションの名前を持つ
  • 開発チームは self-contained な DevOps チームへの変化を目指している
@ysb33r
ysb33r / RelativePath.groovy
Last active November 4, 2022 14:18
The Groovy way to obtain a relative path given two paths.
def root= new File('/usr/share')
def full= new File('/usr/share/docs/rpm-4.4')
// Print the relative path of 'full' in relation to 'root'
// Notice that the full path is passed as a parameter to the root.
def relPath= new File( root.toURI().relativize( full.toURI() ).toString() )