Skip to content

Instantly share code, notes, and snippets.

@haratak
haratak / semantic-commit-messages.md
Created September 6, 2021 12:49 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@haratak
haratak / commit_message_example.md
Created March 21, 2021 13:29 — forked from mono0926/commit_message_example.md
[転載] gitにおけるコミットログ/メッセージ例文集100
@haratak
haratak / yuba-ba.dart
Last active November 11, 2020 13:29
yuba-ba.dart
void main() {
String name = 'たくや';
String newName='';
void generateName(String inputName){
print('湯婆婆「契約書だよ!ここに名前を書きな!」');
print('${inputName}「(カキカキ..)」');
if(name.length >= 2){
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/foundation.dart';
import 'package:wingarc_haccp/data_sources/db.dart';
class EquipmentReason {
const EquipmentReason({
@required this.text,
@required this.pathname,
});
EquipmentReason copyWith({
@haratak
haratak / map_list.dart
Created August 9, 2020 05:56
Usage for Map & List in Dart
void main() {
final persons = {'Takahashi': 23, 'Hamasaki': 27, 'Kawasaki': 25};
final person_list = <Person>[];
persons.forEach((k, v) => person_list.add(Person(k, v)));
persons.entries.forEach((e) => person_list.add(Person(e.key, e.value)));
final animals = {'Cow': 'Male', 'Cat': 'Female', 'Dog': 'Male'};
@haratak
haratak / mixin_extends.dart
Created August 8, 2020 06:39
this is usage for dart mixin and extends
void main() {
Cat cat = Cat("mike");
cat.introduction();
cat.fly();
cat.swim();
cat.walk();
}
mixin Flyer {
@haratak
haratak / self-introduction.py
Created August 3, 2020 10:30
slack内の指定のユーザーのpostを指定のチャンネルから取得し、textファイルに出力するスクリプトです
# python3.6
# coding: utf-8
from os import close
import requests
import json
import io
import sys
import time
from datetime import datetime
@haratak
haratak / enum_sample.dart
Created July 14, 2020 08:51
How to get value from Enum in Dart
void main() {
print(Month.January);
print(Month.January.index);
print(Month.values);
print(HandleEnum.enumToString(Month.January));
print(HandleEnum.enumToList(Month.values));
}
enum Month {
@haratak
haratak / static_member.dart
Created July 14, 2020 07:35
How to use static memver in Dart.
import 'dart:core';
void main() {
Country america = Country('Ameriva','Washington D.C',327000000);
Country chine = Country('Chine','Shanghai',1380000000);
Country russia = Country('Rrussia','Moscow',142000000);
Country germany = Country('Germany','Berlin',806000000);
Country japan = Country('Japan','Tokyo',126000000);