Skip to content

Instantly share code, notes, and snippets.

View shirosaki's full-sized avatar

Hiroshi Shirosaki shirosaki

View GitHub Profile

Keybase proof

I hereby claim:

  • I am shirosaki on github.
  • I am shirosaki (https://keybase.io/shirosaki) on keybase.
  • I have a public key ASAg3u7qFMxoAV9o-D0TguT-3OYsNynAk5WIthsDDHgiywo

To claim this, I am signing this object:

@shirosaki
shirosaki / Chart.bundle.js
Created March 17, 2017 05:01
Fix radar chart position not center #4032
/*!
* Chart.js
* http://chartjs.org/
* Version: 2.5.0
*
* Copyright 2017 Nick Downie
* Released under the MIT license
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Chart = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,modul
@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]:
@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 / make_depend.patch
Created June 27, 2013 17:43
MacVim src dependencies
diff --git a/src/Makefile b/src/Makefile
index 2d4dd10..dc6cedc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1501,7 +1501,8 @@ TAGS_SRC = *.c *.cpp if_perl.xs
EXTRA_SRC = hangulin.c if_lua.c if_mzsch.c auto/if_perl.c if_perlsfio.c \
if_python.c if_python3.c if_tcl.c if_ruby.c if_sniff.c \
- gui_beval.c workshop.c wsdebug.c integration.c netbeans.c
+ gui_beval.c workshop.c wsdebug.c integration.c netbeans.c \
@shirosaki
shirosaki / lua_install.patch
Created June 14, 2013 08:16
Install manual of Lua interface
diff --git a/src/INSTALL b/src/INSTALL
--- a/src/INSTALL
+++ b/src/INSTALL
@@ -172,6 +172,30 @@
And to not search for locally installed headers and libraries at all, use:
./configure --without-local-dir
+Unix: COMPILING WITH LUA
+
+When you want to compile with the Lua interface features enabled, make sure
@shirosaki
shirosaki / ruby_syntax.patch
Created June 12, 2013 13:48
Fix performance of ruby syntax for new regexp engine
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index e4bc98f..dac2d1a 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -117,10 +117,7 @@ syn match rubyPredefinedVariable "$_\>" display
syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display
syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
-syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
-syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
@shirosaki
shirosaki / fix_perf_ruby_syntax.patch
Created June 7, 2013 21:38
Performance fix for ruby syntax
diff --git a/syntax/ruby.vim b/syntax/ruby.vim
index 28f553d..bfa8f21 100644
--- a/syntax/ruby.vim
+++ b/syntax/ruby.vim
@@ -92,20 +92,20 @@ syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
-syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
+syn match rubyConstant "\%(\%([.@$]\@1<!\.\)\@2<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"

Syntax performance on Vim 7.3.1136 Ubuntu Linux

Open a file of filetype=eruby

Then:

:syntime on
Ctrl-L
:syntime report
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6399,18 +6399,18 @@ gui_win32s idem, and Win32s system bein
hangul_input Compiled with Hangul input support. |hangul|
iconv Can use iconv() for conversion.
insert_expand Compiled with support for CTRL-X expansion commands in
Insert mode.
jumplist Compiled with |jumplist| support.
keymap Compiled with 'keymap' support.