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 Machinery < Formula | |
desc "" | |
homepage "" | |
url "https://github.com/efrecon/machinery/releases/download/v0.5.1/machinery-0.5.1-macosx-x86_64" | |
version "0.5.1" | |
sha256 "9232ae62c88009185e78f45c4e99384c0a55744b1983f43a8e5187a27285ea39" | |
depends_on :arch => :x86_64 | |
def install | |
mv 'machinery-0.5.1-macosx-x86_64', 'machinery' |
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
$.fn.bound = function(name){return this[name].bind(this)}; | |
var html = $('#foo').bound('html'); | |
html('hoge'); |
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
#8 0x00007f2b6cc78000 in do_sigwait (sig=0x7f2b67bf1210, set=<optimized out>) | |
at ../nptl/sysdeps/unix/sysv/linux/../../../../../sysdeps/unix/sysv/linux/sigwait.c:60 | |
#9 __GI___sigwait (set=<optimized out>, sig=0x7f2b67bf1210) | |
at ../nptl/sysdeps/unix/sysv/linux/../../../../../sysdeps/unix/sysv/linux/sigwait.c:93 | |
#10 0x00007f2b6795cef8 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () | |
---Type <return> to continue, or q <return> to quit--- | |
from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#11 0x00000fff46dcaa20 in ?? () | |
#12 0x000000000151bbc0 in ?? () | |
#13 0x00000 |
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
def capture_slim(*args, &block) | |
buffer = eval '_buf if defined?(_buf)', block.binding | |
old_buffer = buffer.dup if buffer | |
buffer.clear | |
block[*args] | |
(buffer*'').strip | |
ensure | |
buffer.replace old_buffer | |
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
ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187: [BUG] Segmentation fault at 0xfffffffffffffff8 | |
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0018 p:---- s:0104 e:000103 CFUNC :run_machine | |
c:0017 p:0267 s:0101 e:000100 METHOD ruby/2.1.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187 |
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
def will_return(&block) | |
b, c = block.binding, 1 | |
Kernel.set_trace_func -> event,* do | |
case event | |
when 'call'; c += 1 | |
when 'return' | |
if (c -= 1) == 0 | |
Kernel.set_trace_func nil | |
b.local_variable_set :__result__, block.call | |
b.eval 'return __result__' |
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 Batik < Formula | |
homepage "https://xmlgraphics.apache.org/batik/" | |
url "https://www.apache.org/dist/xmlgraphics/batik/binaries/batik-bin-1.8.zip" | |
sha256 "d1e5d6c08ef769bb53289250f17ba2d8b18a803d2a82aa082c8bbfae07c648f0" | |
def install | |
libexec.install "lib", Dir["*.jar"] | |
prefix.install_metafiles | |
bin.write_jar_script libexec/"batik-rasterizer-#{version}.jar", "batik-rasterizer", "-Djava.awt.headless=true" |
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
f = ->(n) do | |
"1#{'6'*n}".to_i**3 + "5#{'0'*n}".to_i**3 + "3#{'3'*n}".to_i**3 | |
end | |
10.times.map &f | |
#=> [153, | |
# 165033, | |
# 166500333, | |
# 166650003333, | |
# 166665000033333, | |
# 166666500000333333, |
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
IMAGE_WIDTH = 256 | |
IMAGE_HEIGHT = 256 | |
NSUBSAMPLES = 2 | |
NAO_SAMPLES = 8 | |
class Vec | |
def initialize(x, y, z) | |
@x = x | |
@y = y | |
@z = z |
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
makeSearchCommand({ | |
name: "s21g-blog-search", | |
url: "http://blog.s21g.com/?query={QUERY}", | |
icon: "http://blog.s21g.com/favicon.ico", | |
description: | |
"Searches <a href=\"http://blog.s21g.com/\">s21g blog</a> for your words." | |
}); |
OlderNewer