Skip to content

Instantly share code, notes, and snippets.

int sock = socket(PF_INET, SOCK_STREAM);
bind(sock, addr);
listen(sock);
struct epoll_event ev;
struct epoll_event events[1024];
int epfd = epoll_create(1024);
ev.events = EPOLLIN;
ev.data.fd = sock;
int sock = socket(PF_INET, SOCK_STREAM);
bind(sock, addr);
listen(sock);
allsock.add(sock);
while ( 1 ) {
result = select(sock);
if ( result > 0 ) {
int new_sock = accept(sock, &addr);
@mizzy
mizzy / node-simple-proxy.js
Created November 6, 2011 09:07
Simple proxy made by node.js
var http = require('http');
var url = require('url');
var proxy = http.createServer(function(req, res) {
var request = url.parse(req.url);
options = {
host: request.hostname,
port: request.port || 80,
path: request.path,
method: req.method,
resource "aws_acm_certificate" "mizzy_org" {
provider = aws.us-east-1
domain_name = "mizzy.org"
validation_method = "EMAIL"
}
resource "aws_cloudfront_distribution" "mizzy_org" {
enabled = true
aliases = ["mizzy.org"]
#!/usr/bin/env ruby
require 'json'
require 'aws-sdk-ec2'
ec2 = Aws::EC2::Client.new
res = ec2.describe_security_groups
security_groups = res.security_groups
_, err := cloudwatch.NewLogGroup(ctx, "sock_shop", &cloudwatch.LogGroupArgs{
Name: pulumi.String("sock-shop"),
RetentionInDays: pulumi.Int(7),
}, pulumi.Import(pulumi.ID("sock-shop"))
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/cloudwatch"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudwatch.NewLogGroup(ctx, "sock_shop", &cloudwatch.LogGroupArgs{
--- ../../../markfink-splunk/sock-shop/ecs-fargate/cfn-stack-app-only.yaml 2021-09-17 19:50:03.000000000 +0900
+++ ./cfn-stack-app-only.yaml 2021-10-01 21:57:26.000000000 +0900
@@ -35,6 +35,7 @@
Description: >-
Name of an existing EC2 KeyPair to enable SSH access to the SQLImporter
EC2 instance (if none appear in drop-down menu, you need to create one)
+ Default: sock-shop-cloudformation
MinLength: '1'
ConstraintDescription: must be the name of an existing EC2 KeyPair.
Resources:
@mizzy
mizzy / achievement.md
Last active December 29, 2020 23:24
宮下 剛輔の研究・開発業績

宮下 剛輔の研究・開発業績

論文・発表・受賞歴

受賞

  1. 宮下 剛輔, 第10回 日本OSS奨励賞, 昨今要求が高まっているシステム配備の自動化の実現に欠かすことができないサーバの状態を自動的にテストするツールServerspecを開発し、インフラ分野における業務の効率化に貢献, 2015年10月
  2. 宮下 剛輔, Black Duck Open Source Rookies of the Year 2013, 2013年に始まったオープンソースプロジェクトの中で優れたもの10種の中にServerspecが選出, 2014年1月