Skip to content

Instantly share code, notes, and snippets.

View hfm's full-sized avatar

Okumura Takahiro hfm

View GitHub Profile
[mysqld]
server_id=1
log_bin=mysqld-bin
log_slave_updates
relay_log=relay-mysqld-bin
master-info-repository=TABLE
gtid_mode=ON
enforce-gtid-consistency
worker_processes auto;
daemon off;
# error_log logs/error.log;
error_log /dev/stderr;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
@hfm
hfm / -
Created April 8, 2017 23:33
Compiling imlib2 v0.1.0 (file:///Users/hfm/src/github.com/hfm/imlib2-rust)
error[E0412]: cannot find type `_XImage_funcs` in this scope
--> /Users/hfm/src/github.com/hfm/imlib2-rust/target/debug/build/imlib2-3b908bcd354a23f2/out/bindings.rs:1899:12
|
1899 | pub f: _XImage_funcs,
| ^^^^^^^^^^^^^ not found in this scope
error[E0204]: the trait `Copy` may not be implemented for this type
--> /Users/hfm/src/github.com/hfm/imlib2-rust/target/debug/build/imlib2-3b908bcd354a23f2/out/bindings.rs:1881:17
|
@hfm
hfm / -
Created April 8, 2017 23:33
hello
{
"builders":[{
"type": "docker",
"image": "ubuntu",
"commit": true
}],
"provisioners":[
{
"type": "shell",
"inline": [
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.4.1
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
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.2.6
RUN /usr/local/rbenv/bin/rbenv install $RUBY_VERSION
CMD ["tar", "czf", "/tmp/rbenv_${RUBY_VERSION}.tgz", "/usr/local/rbenv/versions/${RUBY_VERSION}"]
@hfm
hfm / pero
Created March 19, 2017 14:02
#! /bin/sh
exec ag "$@" . | peco --exec 'awk -F : '"'"'{print "+" $2 " " $1}'"'"' | xargs less '
--- plugged/nginx-vim-syntax/syntax/nginx.vim 2015-12-22 12:56:42.000000000 +0900
+++ syntax/nginx.vim 2017-02-22 13:26:41.000000000 +0900
@@ -13,7 +13,7 @@
syn match ngxVariableBlock '\$\(\w\+\|{\w\+}\)' contained
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
syn region ngxBlock start=+^+ end=+{+ skip=+\${+ contains=ngxComment,ngxDirectiveBlock,ngxVariableBlock,ngxString oneline
-syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
+syn region ngxString start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
syn match ngxComment ' *#.*$'
FROM centos:7
MAINTAINER OKUMURA Takahiro <hfm.garden@gmail.com>
RUN echo -e "[nginx]\n\
name=nginx repo\n\
baseurl=http://nginx.org/packages/mainline/centos/7/\$basearch/\n\
gpgcheck=0\n\
enabled=1\n\
" > /etc/yum.repos.d/nginx.repo
RUN yum install -y nginx