Skip to content

Instantly share code, notes, and snippets.

View izumin5210's full-sized avatar
🐇

Masayuki Izumi izumin5210

🐇
View GitHub Profile
@hayajo
hayajo / changelog_en.md
Last active November 18, 2023 13:28
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@mhuggins
mhuggins / multiparameter_attribute_assignment.rb
Last active September 5, 2020 19:41
MultiparameterAttributeAssignment
# app/models/concerns/multiparameter_attribute_assignment.rb
module MultiparameterAttributeAssignment
include ActiveModel::ForbiddenAttributesProtection
def initialize(params = {})
assign_attributes(params)
end
def assign_attributes(new_attributes)
@miyaki
miyaki / .latexmkrc
Last active February 20, 2016 21:13
~/.latexmkrc
# $Date:$
$pdf_mode = 1;
$pdflatex = 'pdflatex -interaction=nonstopmode -synctex=1 %O %S';
$bibtex = 'bibtex %O %B';
# for japanese platex2e
# $pdf_mode = 3;
# $latex = 'platex -kanji=utf8 -interaction=nonstopmode -synctex=1 %O %S';
# $bibtex = 'pbibtex -kanji=utf8 %O %B';
gulp = require('gulp')
plumber = require('gulp-plumber')
util = require('gulp-util')
sass = require('gulp-ruby-sass')
rimraf = require('gulp-rimraf')
uglify = require('gulp-uglify')
minifyCSS = require('gulp-minify-css')
streamify = require('gulp-streamify')
size = require('gulp-size')
tap = require('gulp-tap')
@PurpleBooth
PurpleBooth / README-Template.md
Last active April 15, 2024 23:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@djaiss
djaiss / gist:85a0ada83e6bca68e41e
Last active January 1, 2024 22:44
Block Twitter/Facebook in your /etc/hosts
# Block Facebook IPv4
127.0.0.1 www.facebook.com
127.0.0.1 facebook.com
127.0.0.1 login.facebook.com
127.0.0.1 www.login.facebook.com
127.0.0.1 fbcdn.net
127.0.0.1 www.fbcdn.net
127.0.0.1 fbcdn.com
127.0.0.1 www.fbcdn.com
127.0.0.1 static.ak.fbcdn.net
package main
import "fmt"
// WithPrefix
type prefixOption struct{}
func WithPrefix() interface {
GetOption
@creasty
creasty / jobcan_populator.js
Last active October 5, 2023 03:12
Jobcan で埋まっていないところを勝手に埋めてくれるくん
document.querySelectorAll('tr[id^=tr_line_of_]').forEach(el => {
const start = el.querySelector('input[name^=start]');
const end = el.querySelector('input[name^=end]');
const button = el.querySelector('.btn');
const holiday = el.querySelector('#uneditable_holiday');
if (!!start.value && !!end.value) {
return;
}
if (holiday.innerText.match(//)) {