Skip to content

Instantly share code, notes, and snippets.

View hsbt's full-sized avatar
🏠
Working from home

Hiroshi SHIBATA hsbt

🏠
Working from home
View GitHub Profile
10:02 hsbt 角さんの部屋に来た
10:03 hsbt リーダーやマネージャーが組織改革やっても報われない
10:04 hsbt 良いアイデア出しても無視される、論理的に説明しても理解されない、強くいえる権限もない
10:04 hsbt 何で組織改革、変革が難しいのか
10:04 hsbt 機械論的自然観
10:04 hsbt is 何?
10:05 hsbt 相手を機械のように考える世界観
10:05 hsbt 良いアイデアをインプットしたら良くなる、論理的に説明すれば理解してくれるという考え方
10:05 hsbt 対義語、有機体論的自然観
@hsbt
hsbt / patch
Created February 15, 2014 23:44
diff --git a/ext/mysql2/client.c b/ext/mysql2/client.c
index 28f9ced..effa077 100644
--- a/ext/mysql2/client.c
+++ b/ext/mysql2/client.c
@@ -26,7 +26,7 @@ static ID intern_merge, intern_error_number_eql, intern_sql_state_eql;
/*
* used to pass all arguments to mysql_real_connect while inside
- * rb_thread_blocking_region
+ * rb_thread_call_without_gvl
class ExtHash < Hash; end
h = ExtHash.new
h[:a] = :b
p h.class
p h.reject{|k, _| k == :a}.class
#!/usr/bin/env ruby
require "nokogiri"
require 'pry'
require 'htmlentities'
# opens every file in the given dir tree and converts any html img tags to rails image_tag calls
#
# example usage:
# ruby convert.rb ~/my_rails_app/app/views
#
#!/usr/bin/env ruby
Dir.glob(ARGV) do |file|
io = File.read(file)
io.gsub!(/image-url\((.*)\)/) do |match|
"image-url('#{$1}')"
end
io.gsub!(/src="\/images\/(.*\.png)"/) do |match|
"src=\"<%= asset_path('#{$1}') %>\""
end
io.gsub!(/"\/images\/(.*\.gif)"/) do |match|
require 'logger'
class RakeExcecuter < Logger::Application
def initialize(tasklist = [])
super
@tasklist = tasklist
end
private
def run
compiling gc.c
gc.c:4979:18: error: implicit conversion loses integer precision: 'VALUE' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
int is_old = RVALUE_OLD_P(p);
~~~~~~ ^~~~~~~~~~~~~~~
1 error generated.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-jemalloc
## --------- ##
## Platform. ##
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --with-jemalloc
## --------- ##
## Platform. ##
/*
* By default application code must explicitly refer to mangled symbol names,
* so that it is possible to use jemalloc in conjunction with another allocator
* in the same application. Define JEMALLOC_MANGLE in order to cause automatic
* name mangling that matches the API prefixing that happened as a result of
* --with-mangling and/or --with-jemalloc-prefix configuration settings.
*/
#ifdef JEMALLOC_MANGLE
# ifndef JEMALLOC_NO_DEMANGLE
# define JEMALLOC_NO_DEMANGLE