This file contains 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
{ | |
"require": { | |
"swiftmailer/swiftmailer": "5.0.*" | |
} | |
} |
This file contains 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 | |
require 'vendor/autoload.php'; | |
$transport = Swift_SmtpTransport::newInstance('localhost', 25); | |
$mailer = Swift_Mailer::newInstance($transport); | |
// DKIM 用の Signer を作成する | |
$privateKey = file_get_contents('./default.private'); | |
$domainName = 'example.com'; |
This file contains 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 | |
require 'vendor/autoload.php'; | |
$transport = Swift_SmtpTransport::newInstance('localhost', 25); | |
$mailer = Swift_Mailer::newInstance($transport); | |
$message = Swift_Message::newInstance(); | |
$message | |
->setFrom(['suzuki@example.com']) |
This file contains 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 | |
class HogeTest extends PHPUnit_Framework_TestCase | |
{ | |
public function testDummy2() | |
{ | |
$this->assertTrue(true); | |
} | |
} |
This file contains 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
;; magit.el | |
(require 'magit) | |
(eval-after-load 'magit | |
'(progn | |
(set-face-bold-p 'magit-item-highlight nil) | |
(set-face-background 'magit-item-highlight nil) | |
(set-face-foreground 'magit-diff-add "#000000") | |
(set-face-background 'magit-diff-add "#ddffdd") |
This file contains 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
(defun chrome-reload () | |
(interactive) | |
(shell-command "/usr/bin/osascript /path/to/chrome_reload.scpt" nil)) | |
(global-set-key (kbd "C-,") 'chrome-reload) |
This file contains 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
(defvar toggle-scratch-prev-buffer nil) | |
(defun toggle-scratch() | |
"go to *scratch* buffer" | |
(interactive) | |
(if (not (string= "*scratch*" (buffer-name))) | |
(progn | |
(setq toggle-scratch-prev-buffer (buffer-name)) | |
(switch-to-buffer "*scratch*")) | |
(switch-to-buffer toggle-scratch-prev-buffer))) |
This file contains 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
500 Internal Server Error | |
cannot load such file -- pygments (LoadError) | |
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/usr/local/rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' | |
/home/tdiary/tdiary/core/tdiary/style/gfm_style.rb:24:in `block_code' | |
/home/tdiary/tdiary/core/tdiary/style/gfm_style.rb:120:in `render' | |
/home/tdiary/tdiary/core/tdiary/style/gfm_style.rb:120:in `to_html' | |
/home/tdiary/tdiary/core/tdiary/style/gfm_style.rb:50:in `initialize' |
This file contains 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
protected function _getContentTypeCharset() { | |
switch($this->charset) { | |
case 'iso-2022-jp-ms': | |
$charset = 'iso-2022-jp'; | |
break; | |
default: | |
$charset = $this->charset; | |
} | |
return $charset; | |
} |
This file contains 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
$ git diff app/Model/Project.php | |
diff --git a/app/Model/Project.php b/app/Model/Project.php | |
index af47298..fa9c98e 100755 | |
--- a/app/Model/Project.php | |
+++ b/app/Model/Project.php | |
@@ -329,7 +329,7 @@ class Project extends AppModel { | |
$enabledModuleTable = $this->EnabledModule->tablePrefix . $this->EnabledModule->table; | |
$emName = $perm['project_module']; | |
- $base_statement[] = array("EXISTS (SELECT em.id FROM $enabledModuleTable em WHERE em.name='$emName' AND em.project_id=$projectTable.id)" => true); |