Skip to content

Instantly share code, notes, and snippets.

@esetomo
esetomo / userContent.css
Created April 6, 2011 12:12
「コメントのみ表示」チェックボックスを入れるとチェックボックスが入っていない時よりもページが長くなってしまう不具合を修正
.nocomment-hide .mode-more .bookmark-list span.comment {
display: inline !important;
}
.nocomment-hide #container.mode-more .bookmark-list li {
padding-left: 30px !important;
}
.nocomment-hide #container.mode-more .bookmark-list ul.retweet-tree .retweet-node {
padding-left: 0px !important;
@esetomo
esetomo / gist:3747729
Created September 19, 2012 04:47
Miku Miku Online 64bit版Linux用サーバパッチ
--- a/common/network/Utils.hpp
+++ b/common/network/Utils.hpp
@@ -58,8 +58,8 @@ namespace network {
template<>
inline std::string GetSerializedValue(const std::string& t)
{
- size_t size = t.size();
- return ConvertEndian(std::string(reinterpret_cast<const char*>(&size), sizeof(size_t))) +
+ int size = t.size();
+ return ConvertEndian(std::string(reinterpret_cast<const char*>(&size), sizeof(int))) +
@esetomo
esetomo / mod.js
Created July 15, 2013 10:05
Custom Stuff2 Recipe: AdvancedMachines for Greg-Tech
// Custom Stuff2 Recipe: AdvancedMacines for Greg-Tech
var advancedMachinesBlockId = 1741; // from immibis.cfg
mod.addAlias(30181, "electrolyzedWaterCell"); // from IC2.cfg I:itemCellWaterElectro + 256
mod.addAliasWithMetadata(advancedMachinesBlockId, 0, "rotaryMacerator");
mod.addAliasWithMetadata(advancedMachinesBlockId, 1, "singularityCompressor");
mod.addAliasWithMetadata(advancedMachinesBlockId, 2, "centrifugeExtractor");
mod.addAlias(49, "obsidian");
@esetomo
esetomo / gist:6028679
Created July 18, 2013 11:42
ActiveSupportさんよく分からない
1.9.3p429 :009 > 1.minute
=> 60 seconds
1.9.3p429 :010 > 1.minute.class
=> Fixnum
1.9.3p429 :011 > 1.minute.object_id
=> 121
1.9.3p429 :012 > 60
=> 60
1.9.3p429 :013 > 60.object_id
=> 121
@esetomo
esetomo / gist:6028705
Created July 18, 2013 11:49
ActiveSupportさんやっぱりよく分からない
1.9.3p429 :027 > 1.month.from_now
=> Sun, 18 Aug 2013 11:46:34 UTC +00:00
1.9.3p429 :028 > (60 * 60 * 24 * 30).from_now
=> Sat, 17 Aug 2013 11:46:47 UTC +00:00
1.9.3p429 :029 > 1.month == (60 * 60 * 24 * 30)
=> true
1.9.3p429 :030 > 1.month.equal?(60 * 60 * 24 * 30)
=> true
@esetomo
esetomo / Rakefile
Created August 15, 2013 11:34
SecondLife Viewerコンパイル用。CP932でエラーになる部分の修正とか。
# -*- mode: ruby; encoding: utf-8 -*-
require 'albacore'
require 'win32/shortcut'
task :default => :shortcut
BUILD_DIR='viewer-local'
ENV['LANG'] = 'C'
@esetomo
esetomo / lltexteditor.cpp.patch
Created August 15, 2013 17:55
とりあえずいけたぽい
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2832,12 +2832,13 @@ BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect
const LLWString textString(getWText());
const llwchar * const text = textString.c_str();
- const S32 line_height = mFont->getLineHeight();
+ const line_info& line = mLineInfoList[current_line];
+ LLRect text_rect(line.mRect);
@esetomo
esetomo / lltexteditor_debug.diff
Created August 16, 2013 09:52
問題の個所の範囲を描画してみる。
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -2175,6 +2175,26 @@ void LLTextEditor::drawPreeditMarker()
line_start = next_start;
cur_line++;
}
+
+ // for debug
+ LLCoordGL coord;
+ LLRect bounds;
diff -r 5c4dc17956b9 indra/llui/lltexteditor.cpp
--- a/indra/llui/lltexteditor.cpp Fri Aug 16 13:05:38 2013 +0100
+++ b/indra/llui/lltexteditor.cpp Fri Aug 16 17:18:26 2013 +0100
@@ -2782,6 +2782,9 @@
BOOL LLTextEditor::getPreeditLocation(S32 query_offset, LLCoordGL *coord, LLRect *bounds, LLRect *control) const
{
+ static LLUICachedControl<S32> preedit_marker_thickness ("UIPreeditMarkerThickness", 0);
+ static LLUICachedControl<S32> preedit_standout_thickness ("UIPreeditStandoutThickness", 0);
+
@esetomo
esetomo / gist:9433630
Created March 8, 2014 15:38
DAE吐く前の加工的な何か
# -*- coding: utf-8 -*-
import bpy.ops
import bmesh
import os
workdir = os.path.dirname(bpy.data.filepath)
os.chdir(workdir)
outdir = os.path.join(workdir, 'out')
rev = os.popen("git log --pretty=oneline -1 head.blend export.py | cut --fields=1 --delimiter=' '").read()[0:6]