Skip to content

Instantly share code, notes, and snippets.

View shirosaki's full-sized avatar

Hiroshi Shirosaki shirosaki

View GitHub Profile
@shirosaki
shirosaki / mime_decrypt.patch
Created January 30, 2014 01:00
Fix the bug that attachments of PGP/MIME are not showen
diff --git a/package/mimeDecrypt.js b/package/mimeDecrypt.js
index 6b09272..84e384e 100644
--- a/package/mimeDecrypt.js
+++ b/package/mimeDecrypt.js
@@ -165,10 +165,15 @@ PgpMimeDecrypt.prototype = {
if (this.uri.spec.search(/[\&\?]header=[a-zA-Z0-9]*$/) < 0 &&
this.uri.spec.search(/[\&\?]part=[\.0-9]+/) < 0) {
- if (this.uri.spec.search(/[\&\?]header=filter\&.*$/) > 0)
+ // do not return so that jsmimeemitter can handle decrypted message
@shirosaki
shirosaki / 1-result.md
Last active August 29, 2015 14:00
test-all result 2.1.2p80

64bit

$ make test-all TESTS="-qv -j6"

Finished tests in 413.454079s, 34.8624 tests/s, 5880.8804 assertions/s.

  1) Failure:
TestException#test_machine_stackoverflow [c:/Users/hiroshi/work/ruby/test/ruby/t
est_exception.rb:482]:
--- modules/plugins/enigmail.js 2011-08-25 11:56:45.281250000 +0900
+++ ../enigmail.js 2011-08-25 13:23:38.640625000 +0900
@@ -112,7 +112,7 @@
}
}, false);
-function tryEnigmail(bodyElement) {
+function tryEnigmail(bodyElement, aMsgWindow) {
if (bodyElement.textContent.indexOf("-----BEGIN PGP") < 0)
return null;
@shirosaki
shirosaki / gist:1183468
Created August 31, 2011 12:56
fix inline PGP quoted text
--- origin/modules/plugins/enigmail.js 2011-08-29 09:48:13.000000000 +0900
+++ gconversation@xulforum.org/modules/plugins/enigmail.js 2011-08-31 21:37:11.000000000 +0900
@@ -179,6 +179,7 @@
"<div class='moz-text-plain' wrap='true' graphical-quote='true'>"
+ EnigmailFuncs.formatPlaintextMsg(msgRfc822Text)
+ "</div>";
+ replaceTextNodeToPre(bodyElement);
}
return statusFlagsObj.value;
}
@shirosaki
shirosaki / fix_send.js
Created September 10, 2011 06:14
add enigmail feature to quick reply
diff --git a/send.js b/send.js
index f62ad60..b05ce57 100644
--- a/send.js
+++ b/send.js
@@ -192,6 +192,7 @@ function initCompose(aMsgComposeService, aParams, aWindow, aDocShell) {
* @param composeParameters.returnReceipt (optional)
* @param composeParameters.receiptType (optional)
* @param composeParameters.requestDsn (optional)
+ * @param composeParameters.securityInfo (optional)
*
@shirosaki
shirosaki / fenix.patch
Created November 27, 2011 17:56
profile result of tcs-ruby
diff --git a/common.mk b/common.mk
index ea244cc..55b6f46 100644
--- a/common.mk
+++ b/common.mk
@@ -93,6 +93,8 @@ COMMONOBJS = array.$(OBJEXT) \
vm_dump.$(OBJEXT) \
thread.$(OBJEXT) \
cont.$(OBJEXT) \
+ fenix.$(OBJEXT) \
+ fenix_file.$(OBJEXT) \
@shirosaki
shirosaki / file_access.patch
Created December 5, 2011 09:39
tma sample
diff --git a/samples/file_access.cpp b/samples/file_access.cpp
new file mode 100644
index 0000000..1ea02e3
--- /dev/null
+++ b/samples/file_access.cpp
@@ -0,0 +1,108 @@
+#include <ios>
+#include <iostream>
+#include <ostream>
+#include <iomanip>
@shirosaki
shirosaki / file_load_ok.patch
Created December 6, 2011 05:37
file_load_ok performance improvement for Windows
diff --git a/file.c b/file.c
index e566ce3..516225d 100644
--- a/file.c
+++ b/file.c
@@ -5060,7 +5060,33 @@ static int
file_load_ok(const char *path)
{
int ret = 1;
- int fd = open(path, O_RDONLY);
+ int fd;
diff --git a/file.c b/file.c
index e566ce3..24b25b8 100644
--- a/file.c
+++ b/file.c
@@ -5060,7 +5060,38 @@ static int
file_load_ok(const char *path)
{
int ret = 1;
- int fd = open(path, O_RDONLY);
+ int fd;
@shirosaki
shirosaki / bench_result.txt
Created December 13, 2011 15:38
Replace lstat to GetFileAttributes
ruby 2.0.0dev (2011-12-09 trunk 33995) [i386-mingw32]
Windows 7 on VirtualBox
2.4GHz Core 2 Duo
Rails 3.1.3
command: ruby script/rails r "p 1"
Average and standard deviation of 10 times trials
+----------+--------+----------+---------+