Skip to content

Instantly share code, notes, and snippets.

View tamakiii's full-sized avatar

Daichi Tamaki tamakiii

  • undefined
  • Shibuya, Tokyo, Japan
  • X @tamakiii
View GitHub Profile
@tamakiii
tamakiii / .vimrc
Last active December 15, 2015 14:39
" 基本設定(表示)
syntax on
filetype on
filetype indent on
filetype plugin on
" 基本設定(編集)
set nowrap
<?php
class Hoge
{
/**
* "ID" が大文字."Id" ではない
*/
public function getID()
{
return 123;
<?php
use Phake;
$this->row = Phake::mock('RowInterface');
$a = clone $this->row;
$b = clone $this->row;
Phake::when($a)->export()->thenReturn('a');
" 変数整備
let s:uname = system("echo -n \"$(uname)\"")
let s:hostname = system("echo -n \"$(hostname -s)\"")
" 基本設定(表示)
syntax on
filetype on
filetype indent on
filetype plugin on
<?php
/**
* $ curl -sS https://getcomposer.org/installer | php
* #!/usr/bin/env php
* All settings correct for using Composer
* Downloading...
*
* Composer successfully installed to: /Users/d-tamaki/tmp/php/pimple/composer.phar
* Use it: php composer.phar
snippet ->
options word
$this->${1:...}
snippet []
options word
array(${1});
snippet instanceof
options word
<?php
namespace Acme\Component\Slack\Message;
use Acme\Component\Slack\Message\MessageInterface;
use Acme\Component\Slack\Message\SenderInterface;
use Guzzle\Http\ClientInterface;
use Guzzle\Http\Message\Response;
/**
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.home/.omz
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="ys"
# Uncomment the following line to use case-sensitive completion.
@tamakiii
tamakiii / .zshrc
Last active August 29, 2015 14:16
# @see https://github.com/zsh-users/antigen
source ~/.home/vendor/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle git
antigen bundle pip
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle chrissicool/zsh-256color
<?php
function simple_backtrace()
{
$map = function($row) {
$filter = function($k) {
return in_array($k, ['function', 'class', 'file', 'line', 'type']);
};
return array_filter($row, $filter, ARRAY_FILTER_USE_KEY);
};