Skip to content

Instantly share code, notes, and snippets.

View isuke's full-sized avatar
🎵
Listening to music, and coding

FUJIYAMA Isuke isuke

🎵
Listening to music, and coding
View GitHub Profile

Vue Fes Japan

# frozen_string_literal: true
def show_backtrace
puts
puts '=' * 80
Thread.list.each do |thr|
description = thr == Thread.main ? 'Main thread' : thr.inspect
puts
puts "#{description} backtrace: "
puts thr.backtrace.join("\n")
@isuke
isuke / test.adoc
Last active July 27, 2018 14:08
asciidoc test
:chapter-label:
:icons: font
:lang: en
:sectanchors:
:sectlinks:
:sectnums:
:source-highlighter: highlightjs
:toc: left
:toclevels: 2
# frozen_string_literal: true
require 'rspec/retry'
RSpec.configure do |config|
if ENV['RAKSUL_AD_RSPEC_RETRY']&.match?(/true/i)
# show retry status in spec process
config.verbose_retry = true
# show exception that triggers a retry if verbose_retry is set to true
config.display_try_failure_messages = true
# frozen_string_literal: true
require 'action_dispatch/system_testing/test_helpers/screenshot_helper'
module ActionDispatch::SystemTesting::TestHelpers::ScreenshotHelper
LINUX_MAX_FILE_NAME_LENGTH = 255
EXT_NAME = '.png'
# https://github.com/rails/rails/blob/a3ecf4ff1dbb92259e1627bdd09546211f25d906/actionpack/lib/action_dispatch/system_testing/test_helpers/screenshot_helper.rb#L24
def take_screenshot
<template lang="pug">
.vertical-slide(ref="self", :style="{height: height + 'px'}")
transition(
name="-expand",
v-on:before-enter="beforeEnter",
v-on:enter="enter",
v-on:before-leave="beforeLeave",
v-on:leave="leave")
.content(
v-for="state in states",
{
"plugins": {
"postcss-flexbugs-fixes": true,
"autoprefixer": {
"grid": true,
"browsers": [
"last 2 versions",
"IE >= 10",
"Android >= 5",
"last 2 ios version"
@isuke
isuke / .git_consistent
Last active February 9, 2023 11:20
git-consistent sample 04 issue link by branch name
type:
type: enum
required: true
description: 'commit type'
values:
-
name: feat
description: 'when implementing function'
-
name: fix
@isuke
isuke / .git_consistent
Last active February 9, 2023 11:20
git-consistent sample 03 emoji
emoji:
type: enum
required: true
description: 'commit type'
values:
-
name: ':heavy_plus_sign:'
description: 'Feature: when implementing function'
-
name: ':sunny:'
@isuke
isuke / .git_consistent
Created February 10, 2018 09:35
git-consistent sample 02 github issue
githubIssueNum:
type: string
required: false
description: 'github issue number'
prefix: 'close #'
subject:
type: string
required: true
description: 'The subject contains succinct description of the change'
githubIssueUrl: