Skip to content

Instantly share code, notes, and snippets.

View ybiquitous's full-sized avatar
💬

Masafumi Koba ybiquitous

💬
View GitHub Profile
@ybiquitous
ybiquitous / steep-problem-matcher.json
Created March 9, 2022 23:59
Problem Matcher for Steep
{
"problemMatcher": [
{
"owner": "steep",
"pattern": [
{
"regexp": "^(.+):(\\d+):(\\d+): \\[(.+)\\] (.+)$",
"file": 1,
"line": 2,
"column": 3,
@greymd
greymd / sudo新一.md
Last active April 25, 2024 06:34
sudo新一

 オレは高校生シェル芸人 sudo 新一。幼馴染で同級生の more 利蘭と遊園地に遊びに行って、黒ずくめの男の怪しげな rm -rf / 現場を目撃した。端末をみるのに夢中になっていた俺は、背後から近づいてきたもう1人の --no-preserve-root オプションに気づかなかった。 俺はその男に毒薬を飲まされ、目が覚めたら・・・ OS のプリインストールから除かれてしまっていた!

sudo がまだ $PATH に残っていると奴らにバレたら、また命を狙われ、他のコマンドにも危害が及ぶ』

 上田博士の助言で正体を隠すことにした俺は、 which に名前を聞かれて、とっさに『gnuplot』と名乗り、奴らの情報をつかむために、父親がシェル芸人をやっている蘭の $HOME に転がり込んだ。ところが、このおっちゃん・・・とんだヘボシェル芸人で、見かねた俺はおっちゃんになりかわり、持ち前の権限昇格能力で、次々と難タスクを解決してきた。おかげで、おっちゃんは今や世間に名を知られた名エンジニア、俺はといえばシェル芸 bot のおもちゃに逆戻り。クラスメートの convertojichattextimg にお絵かきコマンドと誤解され少年ワンライナーお絵かき団を結成させられる始末。

 ではここで、博士が作ってくれたメカを紹介しよう。最初は時計型麻酔 kill 。ふたについた照準器にあわせてエンターを押せば、麻酔シグナルが飛び出し、プロセスを瞬時に sleep させることができる。 次に、蝶ネクタイ型 banner 。裏についているダイヤルを調整すれば、ありとあらゆる大きさのメッセージを標準出力できる。必殺のアイテムなら fork 力増強シューズ。電気と磁力で足を刺激し、 :(){ :|:& };: でプロセステーブ

@ybiquitous
ybiquitous / actionlint-problem-matcher.json
Last active August 2, 2021 09:58
Run actionlint on GitHub Actions
{
"problemMatcher": [
{
"owner": "actionlint",
"severity": "warning",
"pattern": [
{
"regexp": "^([^:]+):(\\d+):(\\d+): (.+) \\[(\\S+)\\]$",
"file": 1,
"line": 2,
@sindresorhus
sindresorhus / esm-package.md
Last active May 5, 2024 20:24
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@ybiquitous
ybiquitous / steep.yml
Last active August 6, 2021 21:27
Steep on GitHub Actions
# https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#using-a-specific-shell
name: Steep
on: pull_request
jobs:
check:
runs-on: ubuntu-latest
@ybiquitous
ybiquitous / secretlint.yml
Last active May 13, 2021 08:46
Secretlint out of the box via GitHub Actions
# https://github.com/secretlint/secretlint
name: secretlint
on:
push:
branches: ['main']
pull_request:
branches: ['**']
jobs:

Rails.envを減らしたい

TL;DR

  • if Rails.env.production?をやめて、if ENV['ENABLE_HOGEHOGE_FEATURE']のように書いていこう

Kibelaの現状

Rails.envがたくさん生えています。

@ybiquitous
ybiquitous / skip-ci-on-actions.yml
Last active February 9, 2021 10:11
How to "[skip ci]" on GitHub Actions
# See also:
# - https://github.com/actions/runner/issues/774
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#push-event-push
# - https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request
# - https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
name: "[skip ci]" on Actions
on: [push, pull_request]
@ybiquitous
ybiquitous / release.yml
Last active April 14, 2020 14:30
How to automate GitHub releases via GitHub Actions
name: Release
on:
push:
tags: ["**"]
jobs:
run:
runs-on: ubuntu-latest
steps:
(require 'lsp-mode)
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("bundle" "exec" "steep" "langserver"))
:major-modes '(ruby-mode enh-ruby-mode)
:priority -2
:server-id 'steep-ls))
(add-hook 'ruby-mode-hook #'lsp)