Skip to content

Instantly share code, notes, and snippets.

View hakanai's full-sized avatar
⚔️
Battling i16n demons

Hakanai hakanai

⚔️
Battling i16n demons
View GitHub Profile
@hakanai
hakanai / gist:8817530
Created February 5, 2014 04:41
What this jar file appears to be doing to start up
private static void loadFREngineJNIDll()
throws Exception
{
String str1 = null;
ClassLoader localClassLoader = Engine.class.getClassLoader();
if ((localClassLoader instanceof URLClassLoader))
{
localObject = (URLClassLoader)localClassLoader;
for (URL localURL : ((URLClassLoader)localObject).getURLs())
{
@hakanai
hakanai / AquaLayoutStyle.java
Created February 7, 2014 12:31
Modified version of AquaLayoutStyle.java with one correction and some additional debug output
/*
* Haqua - a collection of hacks to work around issues in the Aqua look and feel
* Copyright (C) 2014 Trejkaz, Haqua Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
$ ssh tester@emma
Last login: Wed Feb 12 15:35:36 2014 from somewhere
emma:~ tester$ ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
emma:~ tester$ logout
Connection to emma closed.
$ ssh tester@emma ant -version
Apache Ant(TM) version 1.8.4 compiled on November 8 2012
@hakanai
hakanai / gist:9064418
Created February 18, 2014 03:59
I assume we're not quite out of the woods with require_relative.
LoadError: no such file to load -- jar:file:/Volumes/Big%20Data/Projects/acme/trunk/product/dependencies/jruby/jruby-testing-gems.jar!/gems/rspec-core-2.14.5/lib/rspec/core/filter_manager
require at org/jruby/RubyKernel.java:1054
require at jar:file:/Volumes/Big%20Data/Projects/acme/trunk/product/dependencies/jruby/jruby-complete.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36
require_relative at file:/Volumes/Big Data/Projects/acme/trunk/product/dependencies/jruby/jruby-complete.jar!/jruby/kernel19/kernel.rb:21
(root) at jar:file:/Volumes/Big%20Data/Projects/acme/trunk/product/dependencies/jruby/jruby-testing-gems.jar!/gems/rspec-core-2.14.5/lib/rspec/core.rb:3
call at org/jruby/RubyProc.java:255
(root) at jar:file:/Volumes/Big%20Data/Projects/acme/trunk/product/dependencies/jruby/jruby-testing-gems.jar!/gems/rspec-core-2.14.5/lib/rspec/core.rb:14
require at org/jruby/RubyKernel.java:1054
(root) at jar
#1: (42066.2ms)
SELECT DISTINCT `licences`.id FROM `licences`
INNER JOIN `dongles` ON `dongles`.`id` = `licences`.`dongle_id`
LEFT OUTER JOIN `organisations` ON `organisations`.`id` = `licences`.`organisation_id`
LEFT OUTER JOIN `users` ON `users`.`id` = `licences`.`user_id`
LEFT OUTER JOIN `organisations` `owner_organisations_licences` ON `owner_organisations_licences`.`id` = `licences`.`owner_organisation_id`
LEFT OUTER JOIN `profiles` ON `profiles`.`id` = `licences`.`profile_id`
LEFT OUTER JOIN `licences` `nested_licences_licences` ON `nested_licences_licences`.`parent_licence_id` = `licences`.`id`
User fills in a form like this:
Enter the data you want to process:
+-------------------------------------------------------------------------------------------+
| Content-Type: image/png; |
| name*0*=ISO-2022-JP''%1B%24B%24%22%24%24%24%26%24%28%24*%24%22%24%24%24%26; |
| name*1*=%24%28%24*%24%22%24%24%24%26%24%28%24*%24%22%24%24%24%26%24%28; |
| name*2*=%24*%1B%28B.png |
+-------------------------------------------------------------------------------------------+
Process: idea [88617]
Path: /Applications/IntelliJ IDEA 13 CE.app/Contents/MacOS/idea
Identifier: com.jetbrains.intellij.ce
Version: 13.0.2 (IC-133.696)
Code Type: X86-64 (Native)
Parent Process: launchd [329]
Responsible: idea [88617]
User ID: 501
Date/Time: 2014-03-25 12:01:03.975 +1100
irb(main):010:0> Fiddlybits::Encoding::JISX0208_1983_0.decode('$"$$$&$($*$"$$$&$($*$"$$$&$($*$"$$$&$($*').each do |frag|
irb(main):011:1* str = [frag.code_point].pack("U")
irb(main):012:1> puts "#{frag.bytes} => #{frag.code_point} : #{str}"
irb(main):013:1> end
[36, 34] => 12354 : あ
[36, 36] => 12356 : い
[36, 38] => 12358 : う
[36, 40] => 12360 : え
[36, 42] => 12362 : お
[36, 34] => 12354 : あ
File: AEST
Cab: AEST
Running in: AEST
7-Zip computes: Mon Apr 07 02:00:00 UTC
7-Zip shows: Mon Apr 07 12:00:00 EST 2014
File: AEDT
Cab: AEST
Running in: AEST
7-Zip computes: Mon Mar 31 01:00:00 UTC
static boolean trololololol(boolean bVal) {
while (bVal) {
try {
return true;
}
finally {
break;
}
}
return false;