This file contains hidden or 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
# ログからクエリ発行が多いとこを特定するために呼出元を回数順に並べるやつ | |
# 途中のsedは色付け用のエスケープシーケンスを消すやつ | |
grep 'ActiveRecord::Cause' log/development.log| sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g' | sort |uniq -c | sort -n |
This file contains hidden or 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/bash | |
if [ $# -ne 1 ]; then | |
echo 'Usage: git new repository_name' | |
exit 1 | |
fi | |
REPO_NAME=$1 | |
REPO_DIR=$(ghq root)/github.com/$(whoami)/$REPO_NAME |
This file contains hidden or 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
class Coupon < ApplicationRecord | |
scope :expired, -> { where('valid_until < ', Time.zone.now) } | |
def expired? | |
valid_until < Time.zone.now | |
end | |
end |
This file contains hidden or 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
// ==UserScript== | |
// @name eplusの非当選隠し | |
// @version 0.1 | |
// @author @chiastolite | |
// @match https://north2.eplus.jp/sys/main.jsp* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelectorAll("#contents > div.appli-situation > table > tbody:nth-child(2) > tr[class='win-failure']").forEach( function(element) { element.style.display ="none"; }); |
OlderNewer