Skip to content

Instantly share code, notes, and snippets.

View hfm's full-sized avatar

Okumura Takahiro hfm

View GitHub Profile
%YAML 1.2
---
name: Fluentd
scope: source.fluentd
contexts:
main:
- scope: entity.name.tag.start.fluentd
match: (<)(\w+)(\s([^>]+?))?(>)
captures:
@hfm
hfm / mysql-8.0.14-mysql-8.0.15.diff
Created February 6, 2019 10:05
git diff mysql-8.0.14 mysql-8.0.15
diff --git a/VERSION b/VERSION
index 5872722ccb4..26272be7303 100644
--- a/VERSION
+++ b/VERSION
@@ -1,5 +1,5 @@
MYSQL_VERSION_MAJOR=8
MYSQL_VERSION_MINOR=0
-MYSQL_VERSION_PATCH=14
+MYSQL_VERSION_PATCH=15
MYSQL_VERSION_EXTRA=
$ TF_LOG=DEBUG terraform apply
2018/09/22 05:23:55 [INFO] Terraform version: 0.11.8
2018/09/22 05:23:55 [INFO] Go runtime version: go1.10.3
2018/09/22 05:23:55 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.8/bin/terraform", "apply"}
2018/09/22 05:23:55 [DEBUG] Attempting to open CLI config file: /Users/hfm/.terraformrc
2018/09/22 05:23:55 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/09/22 05:23:55 [INFO] CLI command args: []string{"apply"}
2018/09/22 05:23:55 [INFO] command: empty terraform config, returning nil
2018/09/22 05:23:55 [DEBUG] command: no data state file found for backend config
2018/09/22 05:23:55 [DEBUG] New state was assigned lineage "dbc86cfe-938f-545d-334d-b5c1aaf0cba1"
#include <dirent.h>
#include <fstream>
#include <libgen.h>
#include <stdio.h>
int main(void) {
int maxidx = 0;
DIR *dir;
struct dirent *ent;
const char *base_filename = "queries.log";
namespace :deploy do
namespace :mackerel do
desc 'Record time deploy strated'
task :starting do
run_locally { set :deploy_starttime, Time.now.to_i }
end
desc 'Annotate Mackerel with release url'
task :annotate do
run_locally do
@hfm
hfm / hub_fork.md
Created March 23, 2018 07:48
`hub` の fork サブコマンドは GitHub Enterprise との併用(マルチリモート)でも使えます。その手順を書いておきます。

まず、$HOME/.gitconfig[hub] の host に GHE のホストを追加するために、以下のコマンドを実行します。

git config --global --add hub.host your.ghe.com

実行後、 $HOME/.gitconfig に GHE のホストが登録されます。

[hub]
@hfm
hfm / Dockerfile
Created January 15, 2018 14:07
デイズで ruby 2.5.0 を使うためのビルドファイル
FROM centos:7
RUN yum install -y -q git gcc make bzip2 openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel
RUN git clone -q https://github.com/rbenv/rbenv.git /usr/local/rbenv
RUN git clone -q https://github.com/rbenv/ruby-build.git /usr/local/rbenv/plugins/ruby-build
ENV RBENV_ROOT "/usr/local/rbenv"
ENV RUBY_VERSION 2.5.0
RUN /usr/local/rbenv/bin/rbenv install $RUBY_VERSION
RUN /usr/local/rbenv/bin/rbenv global $RUBY_VERSION
RUN /usr/local/rbenv/shims/gem i bundler --no-document
# Update the systemd temp files
#
# @api public
#
# @see timedatectl(1)
#
# @param operations
# The operations to perform on the systemd tempfiles
#
# * All operations may be combined but you'll probably only ever want to
s\f 1.0 1.4 2.0 2.8 4.0 5.6 8.0 11 16 22 32
1 -2 -1 0 1 2 3 4 5 6 7 8
1/2 -1 0 1 2 3 4 5 6 7 8 9
1/4 0 1 2 3 4 5 6 7 8 9 10
1/8 1 2 3 4 5 6 7 8 9 10 11
1/15 2 3 4 5 6 7 8 9 10 11 12
1/30 3 4 5 6 7 8 9 10 11 12 13
1/60 4 5 6 7 8 9 10 11 12 13 14
1/125 5 6 7 8 9 10 11 12 13 14 15
s\f 1.0 1.4 2.0 2.8 4.0 5.6 8.0 11 16 22 32
1 0 1 2 3 4 5 6 7 8 9 10
1/2 1 2 3 4 5 6 7 8 9 10 11
1/4 2 3 4 5 6 7 8 9 10 11 12
1/8 3 4 5 6 7 8 9 10 11 12 13
1/15 4 5 6 7 8 9 10 11 12 13 14
1/30 5 6 7 8 9 10 11 12 13 14 15
1/60 6 7 8 9 10 11 12 13 14 15 16
1/125 7 8 9 10 11 12 13 14 15 16 17