This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# This script is for rbenv to configure ruby like Ports does. | |
# (amd64 instead of x86_64) | |
# | |
# RUBY_CONFIGURE=ruby-configure | |
# | |
rsync -av /usr/ports/Templates/config.* tools/ | |
exec ./configure "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
refine Hash do | |
def each_smtn(&block) | |
return to_enum(__method__) unless block | |
block.call(1) | |
block.call(2) | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: snippet -*- | |
# name: block-with-var | |
# -- | |
{ |${1:var}| ${1:$(if (string-match "\\\\_<[a-z]\\\\sw*" yas-text) (match-string 0 yas-text))}.$0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' ー | |
, 、 | |
- ー | |
. 。 | |
/ ・ | |
; っ | |
[ 「 | |
] 」 | |
a あ | |
b' びー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return unless Rails.env.test? | |
require 'highline' | |
require "action_dispatch/system_testing/test_helpers/screenshot_helper" | |
module ActionDispatch | |
module SystemTesting | |
module TestHelpers | |
module ScreenshotHelper | |
module HtmlSaver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM gcr.io/google-appengine/ruby:latest | |
ARG REQUESTED_RUBY_VERSION="2.5.1" | |
RUN if test -n "$REQUESTED_RUBY_VERSION" -a \ | |
! -x /rbenv/versions/$REQUESTED_RUBY_VERSION/bin/ruby; then \ | |
(apt-get update -y \ | |
&& apt-get install -y -q gcp-ruby-$REQUESTED_RUBY_VERSION) \ | |
|| (cd /rbenv/plugins/ruby-build \ | |
&& git pull \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# git-merge-structure-sql - git merge driver for db/structure.sql of Rails projects | |
# | |
# How to use: | |
# $ git config merge.merge-structure-sql.name 'Rails structure.sql merge driver' | |
# $ git config merge.merge-structure-sql.driver 'git-merge-structure-sql %A %O %B' | |
# | |
# # To enable it locally: | |
# $ echo 'structure.sql merge=merge-structure-sql' >> .git/info/attributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice rspec-spec-file-for (around request-spec-support (a-file-name) activate) | |
(let ((file ad-do-it)) | |
(setq ad-return-value | |
(cond ((file-exists-p file) | |
file) | |
((string-match "\\`\\(.*/spec/\\)controllers\\(/.+\\)_controller\\(_spec\\.rb\\)\\'" file) | |
(concat (match-string 1 file) | |
"requests" | |
(match-string 2 file) | |
(match-string 3 file))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From c13e8a28268dddf79a21f719fd6d6f274b5ff6a6 Mon Sep 17 00:00:00 2001 | |
From: Akinori MUSHA <knu@idaemons.org> | |
Date: Thu, 15 Feb 2018 19:52:12 +0900 | |
Subject: [PATCH] Avoid using `@` in substitution that confuses FreeBSD make | |
--- | |
Makefile.in | 3 ++- | |
1 file changed, 2 insertions(+), 1 deletion(-) | |
diff --git a/Makefile.in b/Makefile.in |