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
❯ go test -bench . ./oviewer -benchmem | |
goos: darwin | |
goarch: amd64 | |
pkg: github.com/noborus/ov/oviewer | |
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz | |
BenchmarkParseString_Normal-16 2625 401734 ns/op 903699 B/op 20 allocs/op | |
BenchmarkParseString_AnsiEscape-16 1004 1210944 ns/op 1074032 B/op 1221 allocs/op | |
BenchmarkParseString_ChromaTerm-16 482 2405494 ns/op 4406411 B/op 1470 allocs/op | |
BenchmarkDraw_Normal-16 1731 697015 ns/op 728202 B/op 2442 allocs/op | |
BenchmarkDraw_AnsiEscape-16 787 1283360 ns/op 824947 B/op 3187 allocs/op |
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
❯ go test -bench . ./oviewer -benchmem | |
goos: darwin | |
goarch: amd64 | |
pkg: github.com/noborus/ov/oviewer | |
cpu: Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz | |
BenchmarkParseString_Normal-16 2498 420860 ns/op 903698 B/op 20 allocs/op | |
BenchmarkParseString_AnsiEscape-16 865 1318269 ns/op 1074041 B/op 1221 allocs/op | |
BenchmarkParseString_ChromaTerm-16 451 2651899 ns/op 4406445 B/op 1470 allocs/op | |
BenchmarkDraw_Normal-16 358 2822820 ns/op 1261143 B/op 4304 allocs/op | |
BenchmarkDraw_AnsiEscape-16 298 3926522 ns/op 1427113 B/op 5582 allocs/op |
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
class FirefoxDeveloperEdition < Cask | |
version :latest | |
sha256 :no_check | |
url 'https://download.mozilla.org/?product=firefox-aurora-latest-ssl&os=osx&lang=en-US' | |
homepage 'https://www.mozilla.org/en-US/firefox/developer/' | |
license :mpl | |
app 'FirefoxDeveloperEdition.app' | |
end |
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
#!/bin/sh | |
DIRS=`find ./ -type d -name .git -depth 3` | |
for D in $DIRS | |
do | |
pushd . > /dev/null | |
cd $D | |
echo `dirname $D` | |
git rev-parse --abbrev-ref HEAD | |
popd > /dev/null | |
done |
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
% cat composer.json | |
{ | |
"repositories": [ | |
{ | |
"type": "vcs", | |
"url": "https://github.com/yahoojapan/yconnect-php-sdk" | |
} | |
], | |
"require": { | |
"yahoojapan/yconnect-php-sdk": "dev-master" |
NewerOlder