Skip to content

Instantly share code, notes, and snippets.

Avatar
🐆

a.yasui a-yasui

🐆
View GitHub Profile
@a-yasui
a-yasui / tests.php
Created Nov 10, 2021
Dummy class to repository
View tests.php
<?php
namespace Main\Repository;
interface HogeRepository
{
public getVolumes(): int;
}
namespace Tests\Dummy;
View foo.php
<?php
$accessLevel = 'foo';
echo ($accessLevel != "user‮ ⁦// Check if admin⁩ ⁦" ) ? '1' : 'nooo'
@a-yasui
a-yasui / ssl_check.sh
Last active Jun 6, 2021
SSL Certificate Display
View ssl_check.sh
#!/usr/bin/env bash
#
# ./ssl_check.sh <host>
#
# Via: https://serverfault.com/questions/661978/displaying-a-remote-ssl-certificate-details-using-cli-tools
host_name=$1
if [[ "X${host_name}" = "X" ]]; then
echo "./ssl_check.sh <host>"
@a-yasui
a-yasui / gitignore_global
Created Mar 23, 2021
Gitignore_Global at macOS
View gitignore_global
__pycache__
bzr-orphans
*.a
*.o
*.py[co]
*.so
*.sw[nop]
*~
.#*
[#]*#
View my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
server-id = master-01
# Replication Master Server (default)
# binary logging is required for replication
log-bin = mysql-bin
@a-yasui
a-yasui / script_dir.sh
Last active Apr 3, 2020
Work directory moving
View script_dir.sh
#!/usr/bin/env bash
# スクリプトの設置ディレクトリに移動して、そのディレクトリパスを取得する
# :-$0 とする事で他のshellでも動くようになる
PWD="$( cd "$( dirname "${BASH_SOURCE:-$0}" )" && pwd )"
View my_php_inspection_profile_ide.xml
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="atys php inspection" />
<inspection_tool class="ClassNameCollisionInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="JSDuplicatedDeclaration" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="MethodCanBePrivateInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="MethodShouldBeFinalInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="MissingParameterTypeDeclarationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="MissingReturnTypeInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="ToStringCallInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
@a-yasui
a-yasui / JsonSchemaRule.php
Created Dec 24, 2019
JsonSchema using Validation rule at Laravel 5.8
View JsonSchemaRule.php
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
use JsonSchema\Validator;
/**
* Class JsonSchemaRule
View install_mysql_from_rpm.sh
#!/usr/bin/env bash
echo '[INFO] Start Update And Install MySQL5.7';
sudo yum update -y;
sudo rpm -ivh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm;
sudo yum-config-manager --disable mysql80-community;
sudo yum-config-manager --enable mysql57-community
@a-yasui
a-yasui / epub-zipping.py
Created Jun 24, 2019
convert epub from directory.
View epub-zipping.py
#!/usr/bin/env python3
#
# epub-zipping.py
# ===============
#
# This create epub file from directory files.
#
# Description
# ----------------
#