Skip to content

Instantly share code, notes, and snippets.

@yukimunet
yukimunet / validation.php
Last active October 21, 2018 03:58 — forked from oppara/validation.php
Laravel 5.5 日本語バリデーションメッセージファイル
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
@kymmt90
kymmt90 / git-reflog.md
Last active December 28, 2022 11:42
`git reflog` についてまとめてみる

git reflog についてまとめてみる

reflog とは

  • reflog(参照ログ)とは HEAD やブランチ先端の動きの履歴
    • 各個人のローカルリポジトリに存在
    • ブランチの切り替え、新たに加えられた変更のプル、履歴の書き換え、あるいは単なる新規コミットの実行などを記録
  • git reflog で HEAD の移動履歴を、git reflog <ブランチ名> でそのブランチ先端が指していたコミットの一覧を確認可能
    • HEAD@{5}: HEAD の五つ前の状態を示す
@yomotsu
yomotsu / gist:7e2ec401c1520d880308
Last active February 24, 2022 14:16
BEMが失敗しているパターンとその問題点

思いついたら足していく

名前にとらわれすぎ

BAD1

「コンポーネントのエレメントのエレメントのエレメントの...」として定義している

  <div class="v1-news">
@joyrexus
joyrexus / README.md
Last active February 23, 2026 21:20 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})

テスティングフレームワークのインストール

TDDを試せる環境を用意する。これがなきゃ始まらない。

テストの道具を揃える

保存したら即実行、前提データの準備、UIの実行、時間をコントロールするライブラリー、モックライブラリー、Given, When, Thenのフレームワークなど道具を揃え、 すぐに書けるように準備する。

Red Green Refactor のリズム

簡単なお題でRed Green Refactorを試して、体で体感する。

@eric-hu
eric-hu / Open iterm tab here
Last active January 7, 2026 22:35
Apple script to open an iterm2 tab from right-clicking on a file or folder in Finder. To use: (1) Open Automator (2) Create a new service (3) Change "Service receives selected" drop downs to "Files or folders" in "Finder" (4) Select "Run applescript" from the sidebar, then paste this script in and save
-- Adapted from these sources:
-- http://peterdowns.com/posts/open-iterm-finder-service.html
-- https://gist.github.com/cowboy/905546
--
-- Modified to work with files as well, cd-ing to their container folder
on run {input, parameters}
tell application "Finder"
set my_file to first item of input
set filetype to (kind of (info for my_file))
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer:
@kozy4324
kozy4324 / vagrant.md
Last active September 15, 2016 06:08
Vagrantめも

Vagrant

box

OSのベースイメージ. 以下でローカルにprecise32という名前で特定URLからダウンロードして追加する.

$ vagrant box add precise32 http://files.vagrantup.com/precise32.box
@Gab-km
Gab-km / github-flow.ja.md
Last active February 23, 2026 01:59 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@nissuk
nissuk / gist:813066
Created February 6, 2011 03:06
CakePHP(1.3)でJSON出力する単純な例
<?php // {app}/config/routes.php
/**
* Routes Configuration
*
* In this file, you set up routes to your controllers and their actions.
* Routes are very important mechanism that allows you to freely connect
* different urls to chosen controllers and their actions (functions).
*
* PHP versions 4 and 5
*