https://tabelog.com/fukuoka/A4001/A400103/40000116/
スリランカカレー。非常に辛いがスパイスの旨味が素晴らしい。個人的には一番好き。
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
| import contextlib | |
| @contextlib.contextmanager | |
| def overwriting(): | |
| import sys | |
| original_write = sys.stdout.write | |
| def overwrite(text): | |
| original_write('\033[K') # カーソル位置から行末までを消す。 |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>魔法少女まどか☆マギカ</title> | |
| <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.css"> | |
| <style> | |
| html { | |
| font-size: 62.5%; |
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 GitHub Issue Link for Markdown | |
| // @version 0.1 | |
| // @author QUANON | |
| // @match https://github.com/*/*/issues/* | |
| // @grant none | |
| // ==/UserScript== | |
| (() => { | |
| 'use strict'; |
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
| /* @flow */ | |
| import { ucs2 } from 'punycode'; | |
| export default (string: string): number => { | |
| if (!string) return 0; | |
| const processedString: string = | |
| string | |
| .trim() | |
| .replace(/[\n\r\s\u200B]+/g, ''); // U+200B: ZERO WIDTH SPACE |
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
| from fractions import gcd | |
| def lcm(p, q): | |
| ''' | |
| 最小公倍数を求める。 | |
| ''' | |
| return (p * q) // gcd(p, q) | |
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 Hoge | |
| class InvalidBlockError < StandardError; end | |
| attr_accessor :result, :error | |
| # 渡されたブロックを実行して、結果をプロパティに格納するインスタンスメソッド。 | |
| def call | |
| yield | |
| self.result = :success | |
| rescue => e |
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
| あいうえお | |
| かきくけこ | |
| さしすせそ | |
| たちつてと | |
| なにぬねの | |
| はひふへほ | |
| まみむめも | |
| や ゆ よ | |
| らりるれろ | |
| わ を |
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
| # frozen_string_literal: true | |
| require 'memory_profiler' | |
| require 'resolv' | |
| report = MemoryProfiler.report do | |
| # $ wc -l development.log | |
| # 1000000 development.log | |
| open('development.log') do |f| | |
| f |
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
| [1] pry(main)> (1..10).map { |i| (i ** 2).tap(&method(:p)) }.map { |i| i.to_s.tap(&method(:p)) } | |
| 1 | |
| 4 | |
| 9 | |
| 16 | |
| 25 | |
| 36 | |
| 49 | |
| 64 | |
| 81 |