Skip to content

Instantly share code, notes, and snippets.

localdisk /
Last active Jan 14, 2021
echo "install start."
# 時間をあわせる
sudo timedatectl set-local-rtc true
# add repository
# sudo add-apt-repository ppa:mattrose/terminator # terminator
sudo add-apt-repository ppa:atareao/atareao -y # screenkey
brew tap "homebrew/bundle"
brew tap "homebrew/cask"
brew tap "homebrew/core"
brew tap "sanemat/font"
brew tap "homebrew/cask-fonts"
# vsc
brew install "git"
localdisk / Tagify.php
Last active Nov 25, 2021
Livewire Tagify Component
View Tagify.php
namespace App\Http\Livewire;
use App\Models\Tag;
use Illuminate\View\View;
use Illuminate\Contracts\View\Factory;
use Illuminate\Contracts\Container\BindingResolutionException;
use Livewire\Component;
localdisk / Role.php
Created Dec 29, 2019
User Role sample.
View Role.php
class Role extends Model
public function users()
// permissions まで含めると morphedByMany がよさそう
return $this->belongsToMany(User::class);
localdisk / .php_cs
Last active Sep 30, 2019
俺なりの .php_cs
View .php_cs
return PhpCsFixer\Config::create()
'@PSR2' => true,
'align_multiline_comment' => true,
'array_syntax' => ['syntax' => 'short'],
View DevelopServiceProvider.php
namespace Yaranaio\Providers;
use Barryvdh\Debugbar\Facade;
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
View firebase.auth.twitter.js
import firebase from 'firebase/app';
import 'firebase/auth';
import firebaseCofnig from '../config/firebase';
let _firebase;
let _provider;
export default class Auth {
static initialize() {
if (!_firebase) {
localdisk / auth.js
Created Jun 30, 2018
雑な Firebase Twitter login
View auth.js
import firebase from 'firebase/app';
import 'firebase/auth';
//export default Object.assign({}, {
// apiKey: process.env.MIX_FIREBASE_API_KEY,
// authDomain: process.env.MIX_FIREBASE_AUTH_DOMAIN,
// ↑は config/firebase の内容
import firebaseCofnig from '../config/firebase';
localdisk / Cart.php
Created Apr 15, 2018
View Cart.php
namespace Localdisk\Cart;
interface CartInterface
public function add(Product $product): void;
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/matsuo/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See