Skip to content

Instantly share code, notes, and snippets.

View nobuhiko's full-sized avatar

KIMOTO Nobuhiko nobuhiko

View GitHub Profile

すぐれた PHP ライブラリとリソース

Awesome PHP の記事をフォークして翻訳したものです (2013年4月25日)。おどろくほどすごい PHP ライブラリ、リソースやちょっとした情報のリストです。

【訳者コメント】 PHP 入門者のかたにはクィックリファレンスとして PHP: The Right Way 、セキュリティに関しては2011年3月に出版された 体系的に学ぶ 安全なWebアプリケーションの作り方 をおすすめします。

Composer

window.onerror = function(mes,file,num){
track_jserror(mes,file,num);
return false;
}
function track_jserror(mes,file,num){
if("_gaq" in window){
_gaq.push(['_trackEvent', 'Javascript', 'Error', [
"file : " + file,
"line : " + num,
"message : " + mes
@uasi
uasi / git-svn.markdown
Last active March 5, 2024 07:06
git-svn の使い方メモ

git-svn の使い方メモ

git-svn の使い方をメモする。他によいプラクティスがあれば指摘していただけるとありがたい。

用語

SVN のブランチと git のブランチが混在しているため、ここではブランチという語を以下のように区別する。

  • ブランチ、 SVN ブランチ:$SVN_REPO/branches 以下にあるディレクトリ
  • ローカルブランチ:git のローカルブランチ
  • リモートブランチ:git のリモートブランチ
@kazu634
kazu634 / gist:1380314
Created November 20, 2011 14:29
git管理下の空ディレクトリに.gitkeepを作成するスクリプト
#!/bin/bash
/usr/bin/find . -type d -name .git -prune -p -type d -empty -print -exec touch {}/.gitkeep \;
@geeknam
geeknam / git_history.php
Created May 8, 2011 16:43
Parse git log with PHP to an array
<?php
// Author: Ngo Minh Nam
$dir = "/path/to/your/repo/";
$output = array();
chdir($dir);
exec("git log",$output);
$history = array();
foreach($output as $line){
if(strpos($line, 'commit')===0){
@raphaelstolt
raphaelstolt / pre-commit
Created September 20, 2010 21:35
A pre-commit for running PHPUnit
#!/usr/bin/php
<?php
printf("%sGit pre-commit hook %1\$s", PHP_EOL);
$projectName = basename(getcwd());
exec('phpunit --configuration phpunit.xml', $output, $returnCode); // Assuming cwd here
if ($returnCode !== 0) {
$minimalTestSummary = array_pop($output);
printf("Test suite for %s failed: ", $projectName);
printf("( %s ) %s%2\$s", $minimalTestSummary, PHP_EOL);
return false; // exit(1);
@nobodyplace
nobodyplace / MoonAgeTime.php
Created December 1, 2009 17:18
Class Calcurate Moon Age Time
<?php
/**
* Class Calcurate Moon Age Time
*
* PHP version 5
*
* Licence:
*
* Copyright (c) 2006-2009, Ippei Suzuki <nobodyplace@gmail.com>
* All rights reserved.