Skip to content

Instantly share code, notes, and snippets.

View nojimage's full-sized avatar

Takashi Nojima nojimage

View GitHub Profile
@nojimage
nojimage / jquery.markup_first_last.js
Created December 10, 2009 10:19
jquery.markup_first_last.js
/**
* jQuery Markup First and Last Plugin
*
* Copyright 2009, nojimage (http://php-tips.com/)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @version 1.0
@nojimage
nojimage / app_email.php
Created January 27, 2010 13:47
CakePHP EmailComponent for Japanese
<?php
/**
*
* AppEmailComponent (for Japanese)
*
* Copyright 2010, nojimage (http://php-tips.com/)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
@nojimage
nojimage / jquery.firefox_table_fix.js
Created February 2, 2010 13:43
jquery.firefox_table_fix.js
/**
* jQuery firefox table border bug fix plugin
*
* Copyright 2009, nojimage (http://php-tips.com/)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @filesource
* @version 1.0
@nojimage
nojimage / mpdf.progressive-jpeg.patch
Created February 16, 2010 10:37
for mpdf 4.2. progressive jpeg image path.
Index: mpdf.php
===================================================================
--- mpdf.php (original)
+++ mpdf.php (new)
@@ -8000,16 +8000,25 @@
// JPEG
if ($type == 'jpeg' || $type == 'jpg') {
- $hdr = $this->_jpgHeaderFromString($data);
- if (!$hdr) { return $this->_imageError($file, $firsttime, 'Error parsing JPG header'); }
@nojimage
nojimage / eccube-permission.sh
Last active September 4, 2015 12:14
EC-CUBEのインストール時パーミッション設定用スクリプト
#!/bin/sh
## EC CUBE set permission
chmod -R o+w html/install/temp/
chmod -R o+w html/user_data/
chmod -R o+w html/upload/
chmod -R o+w data/class/
chmod -R o+w data/cache/
chmod -R o+w data/logs/
chmod -R o+w data/downloads/
chmod -R o+w data/upload/
@nojimage
nojimage / dbo_mysql_setEncoding.patch
Created March 12, 2010 14:14
cakephp dbo_mysql, dbo_mysqli setEncoding() patch
diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php
index 2cc215b..2730c0d 100644
--- a/cake/libs/model/datasources/dbo/dbo_mysql.php
+++ b/cake/libs/model/datasources/dbo/dbo_mysql.php
@@ -781,5 +781,20 @@ class DboMysql extends DboMysqlBase {
}
return false;
}
+
+/**
@nojimage
nojimage / pear_import.php
Created March 16, 2010 13:13
PEAR Class Loader for CakePHP
<?php
/**
* PEAR Class Loader for CakePHP
*
* ex. pear_import('Net_DNS');
*
* @param $className
* @return boolean
*/
function pear_import($className) {
.svn/
.DS_Store
*.bak
; eclipse files
.buildpath
.project
.settings/
; cakephp temp files
@nojimage
nojimage / setup-permissions.sh
Created April 15, 2010 13:31
BaserCMS setup script
#!/bin/sh
##
#
# BaserCMS install suppot script
#
##
## set permissions
chmod o+w app/config/
chmod o+w app/config/core.php
@nojimage
nojimage / post-checkout
Created May 6, 2010 09:38
.git/hooks/post-checkout
#!/bin/sh
#
# .git/hooks/post-checkout
#
# cakephp apps chmod app tmp dir
chmod -R o+w app/tmp