View notion.json
This file contains 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
{ | |
"title": "Notion", | |
"rules": [ | |
{ | |
"description": "[Notion] Command+[ to Shift+Tab", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "open_bracket", |
View bookmarklet.js
This file contains 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
javascript:'use%20strict';const%20_inputs=document.getElementsByTagName(%22input%22);for(const%20a%20of%20_inputs)a.onpaste=null; |
View 06.rb
This file contains 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
require 'set' | |
def bigram(str) | |
size = str.size | |
Set.new.tap do |result| | |
0.upto(size-2) do |i| | |
result << str[i, 2] | |
end | |
end | |
end |
View facebook-remove-cta.user.js
This file contains 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 Facebook Remove CTA | |
// @namespace jp.youcube.facebook-remove-cta | |
// @include https://www.facebook.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
elm = document.getElementById('pagelet_growth_expanding_cta'); | |
if (elm != null) { |
View area.rb
This file contains 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 Area < ActiveHash::Base | |
self.data = [ | |
{ id: 1, name: '北海道', name_english: 'hokkaido' }, | |
{ id: 2, name: '東北', name_english: 'tohoku' }, | |
{ id: 3, name: '関東', name_english: 'kanto' }, | |
{ id: 4, name: '中部', name_english: 'chubu' }, | |
{ id: 5, name: '関西', name_english: 'kansai' }, | |
{ id: 6, name: '中国', name_english: 'chugoku' }, | |
{ id: 7, name: '四国', name_english: 'shikoku' }, | |
{ id: 8, name: '九州', name_english: 'kyushu' }, |
View to_hex.rb
This file contains 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
#!/usr/bin/env ruby | |
def to_hex(*args) | |
raise ArgumentError, '0-255の範囲のIntegerで指定してね' if args.any? { |_| !_.kind_of?(Integer) || !(0..255).include?(_) } | |
"##{args.map { |_| '%02x' % _ }.join}" | |
end | |
# test | |
p to_hex(0, 0, 0) | |
p to_hex(15, 16, 255) |
View goodbye-gunosy.user.js
This file contains 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 goodbye-gunosy | |
// @namespace jp.youcube | |
// @include http://gunosy.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
$(function(){ | |
location.href = $('.articles-show-click').attr('href'); |
View try_chain.rb
This file contains 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 Object | |
def try_chain(*args) | |
args.inject(self) { |_, method| _.try(method) } | |
end | |
end |
View string.rb
This file contains 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
require 'nkf' | |
class String | |
HYPHEN_LOOKING_CHARS = /[\u00AD\u2011-\u2015\u2043\uFE63\u2212\u207B\u208B\uFF0D\u30FC]/ | |
# self を半角にした文字列を返す | |
# @return [String] 半角にした文字列 | |
def hankaku | |
NKF.nkf('-wWm0Z1', self).gsub(HYPHEN_LOOKING_CHARS, '-') | |
end |
View keyboard_dictionary.txt
This file contains 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
いじぇくと ⏏ 名詞 | |
えすけーぷ ⎋ 名詞 | |
えんたー ⏎ 名詞 | |
おぷしょん ⌥ 名詞 | |
おると ⌥ 名詞 | |
こまんど ⌘ 名詞 | |
こんとろーる ^ 名詞 | |
しふと ⇧ 名詞 | |
たぶ ⇥ 名詞 | |
でりーと ⌫ 名詞 |
NewerOlder