Skip to content

Instantly share code, notes, and snippets.

View YukiYamashina's full-sized avatar
🎯
Focusing

Yuki Yamashina YukiYamashina

🎯
Focusing
View GitHub Profile
@YukiYamashina
YukiYamashina / create_faker_cheat_sheet.sh
Last active July 8, 2022 02:24
Laravel のプロジェクトディレクトリで実行することで Faker のチートシートを作成する.
#!/bin/sh
### ###
### Create a Faker Cheat Sheet. ###
### ###
function extract_methods() {
while read line; do
if [[ $line =~ ^\*[[:space:]]@example[[:space:]](.*) ]]; then
example=${BASH_REMATCH[1]}
@YukiYamashina
YukiYamashina / README.md
Last active October 21, 2020 08:45
QdmailをPHP7.0に対応させる

QdmailをPHP7.0に対応させる

  • コンストラクタ名を__constructorに修正
  • newの前の&を削除
  • QdmailComponent内のfunction & smtpObjectの引数をスーパークラスと合わせて$null = falseに修正
  • HTMLメールでのマルチパート順序をhtml, plain, OMITからplain, html, OMITへ変更
  • iPhone用アドレスをi.softbank.ne.jpからi.softbank.jpに修正
@YukiYamashina
YukiYamashina / file0.sh
Last active April 2, 2018 22:40
shellスクリプトでタイピングゲーム書いてみた ref: http://qiita.com/Yuki_Yamashina/items/a9edcdfc500747d5081a
#!/bin/sh
#
# Reference Web sites:
# http://d.hatena.ne.jp/anmino/20091029/1256806944
# http://www.geocities.jp/abandonment_cat/cygwin/bshell/read.html
# http://www.ibm.com/developerworks/jp/aix/library/au-learningtput/
#
declare -i x_position=`expr \`tput lines\` / 3`
declare -i y_position=`expr \`tput cols\` / 3`
@YukiYamashina
YukiYamashina / move_cursor.sh
Created April 28, 2014 09:01
move cursor on terminal (up: k, down: j, left: h, right: l, quit: q)
#! /bin/sh
function show_coordinate() {
tput civis
tput sc
tput cup 0 0 ; printf "[%3d,%3d] up:k, down:j, left:h, right:l, quit:q" ${1} ${2}
tput rc
tput cnorm
}