Skip to content

Instantly share code, notes, and snippets.

View yum45f's full-sized avatar

Yuma Soga yum45f

View GitHub Profile
did:3:kjzl6cwe1jw145zn2vptdyvyz817hk6qgl0eye680d7i3tv8wa10a9tv25t463b
@yum45f
yum45f / keybase.md
Last active December 20, 2022 09:37

Keybase proof

I hereby claim:

  • I am yum45f on github.
  • I am yum45f (https://keybase.io/yum45f) on keybase.
  • I have a public key ASB5jtduuMiBPSB4fgmsibwXbEJOvWNZBg3O4T8i1FgSxAo

To claim this, I am signing this object:

@yum45f
yum45f / .commit_template
Created December 22, 2018 05:54
Template of commit message for git
# ==================== Emojis ====================
# 🎉 :tada: 初めてのコミット(Initial Commit)
# 🔖 :bookmark: バージョンタグ(Version Tag)
# ✨ :sparkles: 新機能(New Feature)
# 🐛 :bug: バグ修正(Bagfix)
# ♻️ :recycle: リファクタリング(Refactoring)
# 📚 :books: ドキュメント(Documentation)
# 🎨 :art: デザインUI/UX(Accessibility)
# 🐎 :horse: パフォーマンス(Performance)
# 🔧 :wrench: ツール(Tooling)
@yum45f
yum45f / file1.sh
Last active November 20, 2018 11:46
中学生でも1日あれば作れる、人工無脳 Twitter Bot ! ref: https://qiita.com/YuSan19/items/a14c4ba22495322fce92
$ pip install borscht
class ContactForm
include ActiveModel::Model
include ActiveModel::Attributes
#include ActiveModel::Callbacks
attr_accessor :name, :email, :subject, :body, :agreement_privacy_policy
define_model_callbacks :save
validates :name, presence: true
validates :email, presence: true
@yum45f
yum45f / GamePlayer_Property.cs
Last active April 10, 2018 15:24
Unity とかの複数ファイルの変数参照。(1,2年前にやってた程度なのであんま覚えてない)
using UnityEngine;
using System.Collections;
public class GamePlayerProperty : MonoBehaviour {
//ここで変数系はまとめて定義&初期化の時に自動でセットされる値を設定。
public float PlayerSpeed { get; set; } = 10;
public string PlayerName { get; set; } = "Hoge Hoge Man";
public float Score { get; set; } = 0;
// なお、上の式は以下のと同意。(省略形で、バージョン古いと未対応... 確か C# 6.0 から大丈夫。)
// 省略形で書かなくてもよいけどもう見たらわかるし長々と書くよりは上の方が読みやすいような気が。
@yum45f
yum45f / app-fix.coffee
Created January 19, 2018 14:23
Rails でいろいろやってる途中 CoffeeScriptで結構嵌ったのでメモ。(For Blog) Fix版
# Initialize assignment of $ function
jQuery.noConflict()
# Assign the revised number
$j = jQuery
$j ->
$j(".datetimepicker").datetimepicker()
@yum45f
yum45f / app.coffee
Last active January 19, 2018 14:22
Rails でいろいろやってる途中 CoffeeScriptで結構嵌ったのでメモ。(For Blog)
$ ->
$(".datetimepicker").datetimepicker()
@yum45f
yum45f / app-oauth-google.rb
Created September 25, 2017 18:19
Ruby Sinatra を使ってGoogle認証をする(実験編)
require 'rubygems'
require 'bundler'
require 'bundler/setup'
Bundler.require
require 'sinatra'
require 'omniauth'
require 'omniauth-google-oauth2'
#動きは推測だけど。。。
@yum45f
yum45f / callback-oauth.txt
Last active September 25, 2017 18:10
Ruby Sinatra を使ってGoogle認証をする(実験編)
{
"provider" => "google_oauth2",
"uid" => "100000000000000000000",
"info" => {
"name" => "John Smith",
"email" => "john@example.com",
"first_name" => "John",
"last_name" => "Smith",
"image" => "https://lh4.googleusercontent.com/photo.jpg",
"urls" => {