Skip to content

Instantly share code, notes, and snippets.

View pocke's full-sized avatar
⌨️
Pocke is typing...

Masataka Pocke Kuwabara pocke

⌨️
Pocke is typing...
View GitHub Profile
class A
using(Module.new do
refine A do
def private_hello
puts 'Hello, real private method!'
end
end
end)
def public_hello
# Requirements: ghq, hub
# Usage: ruby ghq_clone.rb YOUR_ACCOUNT_NAME
gem 'psych', '>= 3.0.1'
require 'octokit'
require 'psych'
require 'pathname'
def token
hub = Pathname(File.expand_path('~/.config/hub'))
#!/usr/bin/env ruby
require 'pathname'
require 'optparse'
$LOAD_PATH.unshift(Pathname(__dir__).join('../lib/').realpath)
require 'rubocop'
pattern, ruby, version = ARGV.options do |opt|
version = RUBY_VERSION
diff --git a/imagemagick/trunk/PKGBUILD b/imagemagick/trunk/PKGBUILD
index 4c48742f627..38e36e4ac08 100644
--- a/imagemagick/trunk/PKGBUILD
+++ b/imagemagick/trunk/PKGBUILD
@@ -1,9 +1,9 @@
# $Id$
# Maintainer: Eric Bélanger <[email protected]>
-pkgbase=imagemagick
-pkgname=('imagemagick' 'imagemagick-doc')
diff --git a/autoload/iro/ruby.vim.rb b/autoload/iro/ruby.vim.rb
index 9bb1d7b..a638d01 100644
--- a/autoload/iro/ruby.vim.rb
+++ b/autoload/iro/ruby.vim.rb
@@ -11,6 +11,9 @@ module IroVim
source = Vim.evaluate("getbufline(#{bufnr}, 1, '$')").join("\n")
result = Iro::Ruby::Parser.tokens(source)
Vim.command 'let s:result = ' + JSON.generate(result)
+ rescue => ex
+ puts ex.backtrace
module PrivateBlock
def private(*args, &block)
return super unless block_given?
begin
methods = []
mod = Module.new do
define_method :method_added do |name|
super(name).tap do
methods << name
status key command
Conversion Up ConvertPrev
Composition Tab PredictAndConvert
Conversion Tab PredictAndConvert
Composition Space Convert
Conversion Space ConvertNext
Precomposition Space InsertSpace
Conversion Shift Up ConvertPrevPage
Conversion Shift Tab ConvertPrev
Composition Shift Space Convert
static VALUE
str_upto_each(VALUE beg, VALUE end, int excl, int (*each)(VALUE, VALUE), VALUE arg)
{
/* (snip) */
/* normal case */
n = rb_str_cmp(beg, end);
if (n > 0 || (excl && n == 0)) return beg;
after_end = rb_funcallv(end, succ, 0, 0);
def is_nil?(value)
result = true
value&.__id__(result = false)
result
rescue
result
end
TracePoint.new(:line) do |tp|
p tp
def is_nil?(value, _=(value&.__id__(true&&return) rescue return))
return true
end
p is_nil?(nil)
p is_nil?(false)
p is_nil?(true)
class A
undef __id__