Skip to content

Instantly share code, notes, and snippets.

@evalphobia
evalphobia / The_Site_Reliability_Workbook.ch01.md
Last active August 24, 2022 14:21
The Site Reliability Workbook: Chapter 1

Ch.1の前に、この本の簡単な説明。

SRE本が教科書/参考書とするとワークブックは問題集。 SRE本は主に原則や哲学を説明していたが、ワークブックはその原則をどのように適用していくかについて説明。 SRE本はGoogle内でのSREの実践例の話だったが、ワークブックはその他の企業(GCPユーザー)での話もあり。

  • Evernote, Home Depot, NY Times, Spotify

1. SREはDevOpsにどのように関わっていくのか

@masayokoo
masayokoo / SendSlackWIthPRLabeled.js
Created March 26, 2018 10:49
プルリクエストのラベル変更時にSlack通知するGoogleAppsScriptサンプル
function doPost(e) {
var url = 'https://hooks.slack.com/services/***************'; //slack webhook url
var channel = '***************'; //投稿先チャンネル名
var userName = 'github'; //BOTの名前
var json = e.postData.getDataAsString();
var payload = JSON.parse(json);
if (isSendAction(payload)) {
sendSlack(url, userName, channel, sendText(payload))
}
}
@slavafomin
slavafomin / nodejs-custom-es6-errors.md
Last active March 9, 2024 12:03
Custom ES6 errors in Node.js

Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.

I've tried to make it as lean and unobtrusive as possible.

Defining our own base class for errors

errors/AppError.js

@mironal
mironal / gist:c14a2848e752baead8e2
Last active April 1, 2022 07:24
コミットメッセージガイドライン

コミットメッセージガイドライン

概要

このドキュメントは feather のコミットメッセージをどのように書くのかを示すガイドラインです。

feather ではコミットメッセージを元にリリースノートを自動生成しているため 一定のフォーマットに従ってコミットメッセージが書かれている必要があります。

ここではどのようなフォーマットでコミットメッセージを書けばよいのかを記載します。

@ksasao
ksasao / udp-play.py
Last active September 2, 2015 15:11
UDPの特定のポートを時刻付きで録画再生。 License: WTFPL
# -*- coding: utf-8 -*-
import socket
import sys
import time
host = '127.0.0.1'
port = 21730
# open file
argvs = sys.argv
@voluntas
voluntas / webrtc_service_ question.rst
Last active July 4, 2023 08:59
WebRTC サーバサイド技術質問一覧
@kankikuchi
kankikuchi / 1SceneDataClassCreator.cs
Last active June 9, 2016 10:55
シーン名とシーン番号を定数で管理するクラスを作成しつつシーン名とシーン番号を関連付けたSceneDataを書き出すスクリプト【Unity】
using System;
using System.IO;
using System.Text;
using UnityEditor;
using UnityEditorInternal;
using UnityEngine;
using System.Collections.Generic;
using System.Linq;
/// <summary>
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@nikuyoshi
nikuyoshi / build-crosscompile-env.sh
Last active November 20, 2022 13:17
Goのクロスコンパイル環境構築のためのシェルスクリプト
#!/bin/sh
# Environment list
# $GOOS $GOARCH
# darwin 386
# darwin amd64
# freebsd 386
# freebsd amd64
# freebsd arm
# linux 386