Skip to content

Instantly share code, notes, and snippets.

@localdisk
localdisk / gist:23c6c9d847b944f00ed6222fc4935006
Last active September 9, 2016 11:13
composer create-project
$ composer clearcache
Clearing cache (cache-dir): /Users/matsuo/.composer/cache
Clearing cache (cache-files-dir): /Users/matsuo/.composer/cache/files
Clearing cache (cache-repo-dir): /Users/matsuo/.composer/cache/repo
Cache directory does not exist (cache-vcs-dir):
All caches cleared.
$ composer create-project laravel/laravel test
Installing laravel/laravel (v5.3.0)
- Installing laravel/laravel (v5.3.0)
@localdisk
localdisk / MakePost.php
Created July 20, 2016 13:34
Postを作るコマンド
<?php
namespace App\Console\Commands;
use App\Post;
use Carbon\Carbon;
use Faker\Factory;
use Illuminate\Console\Command;
class MakePost extends Command
@localdisk
localdisk / FetchPost.php
Created July 20, 2016 07:41
cursor メソッド
<?php
namespace App\Console\Commands;
use App\Post;
use Illuminate\Console\Command;
class FetchPost extends Command
{
/**
@localdisk
localdisk / AuthTest.stub.php
Created March 6, 2016 00:15
AuthTest.stub
<?php
use {{namespace}}User;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class AuthTest extends TestCase
{
use DatabaseMigrations;
@localdisk
localdisk / main.yml
Created March 4, 2016 16:45
ansible
- name: add repository 'epel'
command: rpm -ih http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm creates=/etc/yum.repos.d/epel.repo
tags:
- common
- name: download rpm
get_url: url=https://www.rabbitmq.com/releases/rabbitmq-server/v3.3.0/rabbitmq-server-3.3.0-1.noarch.rpm dest=/home/deploy/rabbitmq-server-3.3.0-1.noarch.rpm
tags:
- rabbitmq
- name: install RabbitMQ RPM
@localdisk
localdisk / result.json
Created February 22, 2016 05:26
なんでやねん…
{
"changed":false,
"failed":true,
"invocation":{
"module_args":{
"conf_file":null,
"disable_gpg_check":false,
"disablerepo":null,
"enablerepo":null,
"exclude":null,
@localdisk
localdisk / home.blade.php
Created February 4, 2016 02:19
home.blade.php
@extends('layouts.default')
@section('content')
<h1>Hello</h1>
@stop
@section('button')
<button class="btn btn-primary">bar</button>
@show
@localdisk
localdisk / layout.blade.php
Created February 4, 2016 02:18
layout.blade.php
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>@yield('title', 'default title')</title>
<link rel="stylesheet" href="{{ asset('/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('/css/bootstrap.theme.min.css') }}">
@section('css')
@show
</head>
@localdisk
localdisk / laravel.php
Created December 24, 2015 09:28
deployer laravel recipe
<?php
require 'recipe/common.php';
// Laravel shared dirs
set('shared_dirs', [
'storage/app',
'storage/framework/cache',
'storage/framework/sessions',
'storage/framework/views',
@localdisk
localdisk / gist:84ea12bf89938d9190eb
Created November 26, 2015 23:05
viChrome settings
### Sample Settings
# aliases
# in this example you can open extensions page by the command ':ext'
# and Chrome's option page by the command ':option'
alias ext TabOpenNew chrome://extensions/
alias option TabOpenNew chrome://settings/browser
alias downloads TabOpenNew chrome://downloads
alias history TabOpenNew chrome://history