Skip to content

Instantly share code, notes, and snippets.

Avatar

Takashi Nojima nojimage

View GitHub Profile
@nojimage
nojimage / content.md
Last active May 25, 2022 01:30
MariaDBのダンプをMySQL Workbenchで取る方法
View content.md
@nojimage
nojimage / gearman-code-completion.php
Created September 16, 2011 05:10
pecl gearman classes code completion for NetBeans
View gearman-code-completion.php
<?php
/**
* for code completion
*
* @link http://docs.php.net/manual/en/book.gearman.php
*/
if (false) {
define('GEARMAN_SUCCESS', 0);
@nojimage
nojimage / session_acl_component.php
Created January 14, 2011 11:12
CakePHP ACL Caching using Session
View session_acl_component.php
<?php
/**
* AclComponent using Session Cache for CakePHP 1.3
*
* Copyright 2011, nojimage (http://php-tips.com/)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
@nojimage
nojimage / xdebug-3-upgrade-guide.ja.md
Last active December 29, 2020 00:26
Xdebug 3 アップグレードガイド
View xdebug-3-upgrade-guide.ja.md

Xdebug 3 アップグレードガイド

原文: https://xdebug.org/docs/upgrade_guide

Xdebug 2 から 3 へのアップグレード

An upgrade guide detailing which changes there are between Xdebug 2 and 3, and how to reconfigure your set-up to do similar things.

このアップグレードガイドは、Xdebug 2から3への変更点と、同様のことを行うようにセットアップを再構成する方法を詳しく説明します。

@nojimage
nojimage / index.html
Created December 4, 2009 17:07
jquery.justify.js
View index.html
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery Justify</title>
<script type="text/javascript" src="js/jquery.1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery.justify.js"></script>
<script type="text/javascript">
$(document).ready(function(){
@nojimage
nojimage / 01-instration
Created September 16, 2011 02:44
gearman with mysql in macports
View 01-instration
sudo port install gearmand +drizzle
sudo port install php5-gearman
sudo vim /Library/LaunchDaemons/org.macports.gearmand.plist
@nojimage
nojimage / init-vmware-catalina.sh
Last active March 17, 2020 05:00
Fixes VMWare black screen when macOS update to Catalina
View init-vmware-catalina.sh
#!/bin/sh
#
# Running on macOS Recovery Mode Terminal
#
# 1. Save this script to Your home dir.
# eg) /Users/your-name/init-vmware-catalina.sh
#
# 2. Restart the machine and go to Recovery Mode.
# (hold [⌘ + R] when the computer starts until you see an Apple logo)
@nojimage
nojimage / AppModel.php
Created March 29, 2012 12:22
CakePHP paginate using MySQL SQL_CALC_FOUND_ROWS
View AppModel.php
class AppModel extends Model {
/**
* set SQL_CALC_FOUND_ROWS for MySQL
*
* @param array $conditions
* @param array $fields
* @param array $order
* @param int $limit
* @param int $page
* @param int $recursive
@nojimage
nojimage / build.sh
Last active January 24, 2020 04:02
install php 5.6.40 with brew
View build.sh
## install openssl 1.0.2t
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/
git checkout 8b9d6d688f483a0f33fcfc93d433de501b9c3513 -- openssl.rb
brew install openssl
## build php: "/usr/local/Cellar/icu4c/64.2" is a specific icu4c version.
LDFLAGS=-L/usr/local/Cellar/icu4c/64.2 \
CONFIGURE_OPTS="--with-pear --with-openssl=/usr/local/Cellar/openssl/1.0.2t --with-icu-dir=/usr/local/Cellar/icu4c/64.2" \
phpenv install 5.6.40
@nojimage
nojimage / rector.sh
Created January 10, 2020 08:44
rector on docker の起動コマンドサンプル
View rector.sh
docker run --rm -v "$(pwd)":/app -w /app --entrypoint /rector/bin/rector rector/rector process src --dry-run