Skip to content

Instantly share code, notes, and snippets.

mizuki_r rymizuki

Block or report user

Report or block rymizuki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rymizuki
rymizuki / UserFindCommand.php
Last active Sep 27, 2019
CleanArchitecture + Flux on Console
View UserFindCommand.php
<?php
namespace Example\Console\Command;
class UserFindCommand extends Symfony\Console\Command\Command
{
private $interactor;
public function __construct(UserFindInteractor $interactor)
{
parent::__construct();
@rymizuki
rymizuki / Test::Spy
Created May 10, 2018
PerlでSinon.jsライクにcalled_countとcalled_argsを呼び出せるなにか
View Test::Spy
package Test::Spy;
use Mouse;
use Test::Mock::Guard ();
has module => (
is => 'ro',
isa => 'ClassName',
);
has method => (
@rymizuki
rymizuki / cli.js
Last active Sep 1, 2016
2016-09-02.gotandajs.
View cli.js
'use strict'
const fs = require('fs')
const path = require('path')
const _ = require('lodash')
const protagonist = require('protagonist')
const filepath = path.join(__dirname, 'user.md')
const raw = fs.readFileSync(filepath, 'utf8')
@rymizuki
rymizuki / components_main_action-creator.js
Last active Mar 16, 2016
syntagme.js - 記号化されたFluxを紬ぎ、拡張するフレームワークの構想
View components_main_action-creator.js
import syntagme from 'syntagme'
import repository from 'repository/main'
export function mount () {
return syntagme.ac("MOUNT", function () {
return repository.fetch()
})
}
View 例えば...
app.psgi
```perl
use Amon2::Lite;
post '/api/user/', sub {
my ($c, $args) = @_;
my $params = $c->req->parameters;
my $user = $c->db->select_row('SELECT * FROM `user` FROM `name` = ?', [$params->{name}]);
return $c->create_response(409) if $user;
$c->db->query('INSERT INTO `user` (`name`, `email`) VALUES (?, ?)', [$params->{name}, $params->{email}]);
@rymizuki
rymizuki / SassMeister-input-HTML.jade
Created Apr 15, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.jade
div.wrapper
article.contents
header.contents__header
h1.title title
div.contents__body
section.section
h3.section__title 超長い文章
div.section__body.iscroll-content
div.scroller
p ぶんしょう
@rymizuki
rymizuki / SassMeister-input-HTML.jade
Created Apr 15, 2015
Generated by SassMeister.com.
View SassMeister-input-HTML.jade
div.wrapper
article.contents
header.contents__header
h1.title title
div.contents__body
section
h3 超長い文章
div.iscroll-content
div.scroller
p ぶんしょう
View file0.js
var http = require("http");
var express = require("express");
var morgan = require("morgan");
morgan.format("orig-format", "[:date] :method :url :status :response-time ms");
app = express();
app.use(morgan("orig-format"));
app.get("/", function (req, res) {
res.send("Hello World\n");
@rymizuki
rymizuki / SassMeister-input-HTML.jade
Created Sep 25, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.jade
div.buttons
a.button--general sample
a.button--important sample
a.button--navigate sample
a.button--payment sample
@rymizuki
rymizuki / SassMeister-input-HTML.jade
Created Aug 18, 2014
Generated by SassMeister.com.
View SassMeister-input-HTML.jade
div.buttons
a.button--general sample
a.button--important sample
a.button--navigate sample
a.button--payment sample
You can’t perform that action at this time.