Skip to content

Instantly share code, notes, and snippets.

View yamatatsu10969's full-sized avatar
:octocat:
Working at home

Yamamoto Tatsuya yamatatsu10969

:octocat:
Working at home
View GitHub Profile
@yamatatsu10969
yamatatsu10969 / .commit_template
Created May 12, 2022 23:20 — forked from susatthi/.commit_template
コミットテンプレート
# ==================== Emojis & Prefix ====================
# ✨ feat: 新しい機能
# 🐛 fix: バグの修正
# 📚 docs: ドキュメントのみの変更
# 🖋 style: 空白、フォーマット、セミコロン追加など
# ♻️ refactor: 仕様に影響がないコード改善(リファクタ)
# 🐎 perf: パフォーマンス向上関連
# 🚨 test: テスト関連
@yamatatsu10969
yamatatsu10969 / string_extension.dart
Created February 10, 2022 05:22
Full width number to half width number
const _fullLengthCode = 65248;
extension StringExtension on String {
String toHalfWidthNumber() {
final regex = RegExp(r'^[0-9]+$');
final string = runes.map<String>((rune) {
final char = String.fromCharCode(rune);
return regex.hasMatch(char)
? String.fromCharCode(rune - _fullLengthCode)
: char;
@yamatatsu10969
yamatatsu10969 / .gitattributes
Created February 5, 2022 03:14
Don't show diffs on GitHub PR at Flutter project
*.chopper.dart linguist-generated=true
*.freezed.dart linguist-generated=true
*.g.dart linguist-generated=true
*.gen.dart linguist-generated=true
*.gr.dart linguist-generated=true
@yamatatsu10969
yamatatsu10969 / html_practice.html
Last active December 29, 2021 08:50 — forked from machida/html_practice.html
HTMLの練習(このレシピにマークアップをしてみましょう)
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>カレーのレシピ</title>
</head>
<body>
<article>
<h1>カレーのレシピ</h1>
<p>
@yamatatsu10969
yamatatsu10969 / JapanesePhoneNumberFormatter.dart
Last active September 14, 2021 08:36
Custom TextInputFormatter Auto Fill Hyphen [Flutter]
class JapanesePhoneNumberFormatter extends TextInputFormatter {
@override
TextEditingValue formatEditUpdate(
TextEditingValue oldValue, TextEditingValue newValue) {
final oldValueLength = oldValue.text.length;
final newValueLength = newValue.text.length;
final isStartZero = newValue.text.startsWith('0');
if (newValueLength > 0 && newValueLength > oldValueLength) {
final maxLengthIncludeHyphen = isStartZero ? 13 : 12;
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@yamatatsu10969
yamatatsu10969 / これから学ぶmacOSターミナル.md
Created July 18, 2019 12:58
これから学ぶmacOSターミナル・コマンドまとめ

コマンドまとめ

uname

OSの情報を表示する
書式:uname [オプション]

  • -m・・・プロセッサのハードウェア名を表示
  • -n・・・ネットワークのホスト名を表示

echo

文字列を画面に表示する
書式:echo [オプション] 文字列