Skip to content

Instantly share code, notes, and snippets.

diff --git a/build.xml b/build.xml
index e2d57e3..790456f 100644
--- a/build.xml
+++ b/build.xml
@@ -396,11 +396,7 @@
<target name="-assemble-native-jar" depends="-init-vars, -build-platform-jar">
<jar jarfile="${native.jar}" index="true" update="true" duplicate="preserve"
filesetmanifest="skip">
- <archives>
- <zips>
@nirvdrum
nirvdrum / foo.sh
Created July 1, 2016 01:46 — forked from waylan/foo.sh
Simple bash subcommands. Each subcommand is implemented as a function. For example, `sub_funcname` is called for `funcname` subcommand.
#!/bin/sh
ProgName=$(basename $0)
sub_help(){
echo "Usage: $ProgName <subcommand> [options]\n"
echo "Subcommands:"
echo " bar Do bar"
echo " baz Run baz"
echo ""
def gen_point
[rand, rand]
end
points = []
10_000.times do |i|
points << [i, gen_point]
end

A Tale of Two Strings

RubyKaigi 2016 Conference Proposal

Strings are used pervasively in Ruby. If we can make them faster, we can make many apps faster.

In this talk, I will be introducing ropes: an immutable tree-based data structure for implementing strings. While an old idea, ropes provide a new way of looking at string performance and mutability in Ruby. I will describe how we replaced a byte array-oriented string representation with a rope-based one in JRuby+Truffle. Then we’ll look at how that impacts common string operations, its immediate performance impact, and how ropes can have cascading performance implications.

@nirvdrum
nirvdrum / howto-tomato-l2tp-ipsec-server.markdown
Last active December 2, 2016 16:23 — forked from dferg/howto-tomato-l2tp-ipsec-server.markdown
HOWTO: Install L2TP/IPsec Server on TomatoUSB

Introduction

This howto describes setting up a LT2P over IPsec VPN server on your router with TomatoUSB firmware. This should allow you to connect using the built-in client to your Mac, iPhone or Android device. (Not sure about Windows.)

At the end of this tutorial, you should have a L2TP/IPsec VPN server that starts automatically on boot. Mac/iPhone/Android devices can connect with their native client and will be assigned an IP address within your LAN subnet. They should be able to talk to other devices on your LAN and should be able to contact hosts on the Internet NAT'd behind your WAN IP address.

Requirements

  • Router running Shibby's fork of TomatoUSB
  • entware installed to a USB stick mounted at /opt (howto)
class A
# There is Kernel#public_method, so we don't want this one to clash
def pub_method; :public_method; end
def undefed_method; :undefed_method; end
undef_method :undefed_method
protected
def protected_method; :protected_method; end

Keybase proof

I hereby claim:

  • I am nirvdrum on github.
  • I am nirvdrum (https://keybase.io/nirvdrum) on keybase.
  • I have a public key whose fingerprint is 9EA0 9386 E31B 483F 6205 70F6 A71B D772 6233 3111

To claim this, I am signing this object:

[exec] 1) Failure:
[exec] TestDefined#test_defined_impl_specific [/home/travis/build/jruby/jruby/test/mri/ruby/test_defined.rb:105]:
[exec] [ruby-core:47558].
[exec] Expected "constant" (oid=11660) to be the same as "constant" (oid=11662).
[exec]
[exec] 2) Failure:
[exec] TestHash#test_ASET_fstring_key [/home/travis/build/jruby/jruby/test/mri/ruby/test_hash.rb:229]:
[exec] Expected "abc" (oid=13312) to be the same as "abc" (oid=13314).
[exec]
[exec] 3) Failure:
~/d/w/jnr-posix /master> locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
Finished tests in 82.736000s, 31.6186 tests/s, 2195.2475 assertions/s.
1) Failure:
TestSuper#test_array2 [ from /home/nirvdrum/dev/workspaces/jruby/test/mri/ruby/test_super.rb:88]:
Failed assertion, no message given.
2) Failure:
TestSuper#test_array3 [ from /home/nirvdrum/dev/workspaces/jruby/test/mri/ruby/test_super.rb:92]:
Failed assertion, no message given.