This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Database] | |
driver = "mysql" | |
server = "" | |
user = "hoge" | |
password = "fuga" | |
database = "testgo" | |
charset = "utf8" | |
parseTime = "true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var exec = require('child_process').exec; | |
gulp.task('watch',function(){ | |
gulp.watch("./src/**/*.php").on('change',function(event){ | |
var command = "php-cs-fixer fix " + event.path + " --config-file=" + __dirname + "/.php_cs" | |
exec(command); | |
console.log("execute command: "+command); | |
}) | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
use AppBundle\DependencyInjection\Compiler\YahooOAuthCompilerPass; | |
class AppBundle extends Bundle | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\OAuth\ResourceOwner | |
use HWI\Bundle\OAuthBundle\OAuth\ResourceOwner\GenericOAuth2ResourceOwner; | |
use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken; | |
use Symfony\Component\HttpFoundation\Request; | |
use Buzz\Message\RequestInterface as HttpRequestInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolverInterface; | |
class YahooJpResourceOwner extends GenericOAuth2ResourceOwner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* __invoke()を使う意味がわからなかったけど、よく考えたらcallableな引数渡すときに無名関数じゃなくて、オブジェクト | |
* そのものを渡したい時に使えそうだと思った。 | |
*/ | |
class Hoge { | |
public function __invoke(string $output) | |
{ | |
$this->exec($output); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Created by PhpStorm. | |
* User: polidog | |
* Date: 2016/05/26 | |
*/ | |
namespace AppBundle\Twig\Excetsion; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nightmare = require 'nightmare' | |
request = require 'request' | |
fs = require 'fs' | |
Gyazo = require 'gyazo-api' | |
nightmare = Nightmare() | |
url = process.env.HATENA_COUNT_URL | |
filename = "./ss.png" | |
client = new Gyazo(process.env.GYAZO_TOKEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function recursive_array_search($needle, array $haystack) { | |
foreach ($haystack as $key => $value) { | |
if ($value === $needle) { | |
return $key; | |
} | |
if (is_array($value)) { | |
$chideKey = recursive_array_search($needle, $value); | |
return [$key, $chideKey]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "polidog/composer-test", | |
"authors": [ | |
{ | |
"name": "polidog", | |
"email": "[email protected]" | |
} | |
], | |
"repositories": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import re | |
import unicodedata | |
from sh import aws | |
BUCKET = "aws-bucket-name" # 対象のs3 bucket名 | |
s3 = aws.bake("s3") | |
def _s3rename(path, name, rename): |