Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am lpm11 on github.
  • I am lpm11 (https://keybase.io/lpm11) on keybase.
  • I have a public key ASDcoq81e8Nd2tmhWAQvSW5igNa6nZUTbSSZoe9xYFzQTAo

To claim this, I am signing this object:

@lpm11
lpm11 / texshop_color_obsidian.sh
Created December 26, 2014 12:50
Obsidian dark color scheme for TeXShop
#!/bin/sh
# Obsidian color scheme for TeXShop
# ref: http://eclipsecolorthemes.org/?view=theme&id=21
# background = #293134
defaults write TeXShop background_R 0.161
defaults write TeXShop background_G 0.192
defaults write TeXShop background_B 0.204
# commands = #93C763

Comparison between DigitalOcean vs. IDCF Cloud

Powered by UnixBench 5.1.3.

Note: For IDCF cloud, there are known issues which affect an execl throughput (http://www.idcf.jp/blog/cloud/unixbench3/). Since the following results taken while the ASLR is active, the execl throughput might affected.

DigitalOcean (512MB/1CPU droplet)

Benchmark Run: Wed Oct 15 2014 19:53:59 - 20:21:35
1 CPU in system; running 1 parallel copy of tests
@lpm11
lpm11 / doc2pdf.vbs
Last active December 17, 2015 20:19
指定ディレクトリ (又は引数) の doc/docx を pdf に変換
Set objFs = CreateObject("Scripting.FileSystemObject")
Set objWord = CreateObject("Word.Application")
' 1. ファイル直接引数渡しの場合
' Set args = WScript.Arguments
' 2. 指定ディレクトリ (この場合はカレントディレクトリ (".")) から探す場合
' ReDim args(-1)
' For Each filename in objFs.GetFolder(".").Files
' ext = objFs.GetExtensionName(filename)
@lpm11
lpm11 / sexypypy.md
Last active December 13, 2015 17:09
Sexy-prime benchmark on Topaz vs. PyPy.
@lpm11
lpm11 / unch.md
Last active December 13, 2015 17:09
Just another Unscientific Benchmark of Topaz vs. MRI-Ruby.
@lpm11
lpm11 / gist:4012723
Created November 4, 2012 17:37
Twitter チェイサー
#!/bin/env ruby
#-*- coding: utf-8 -*-
require("twitter")
require("json")
require("hashie")
# たどってみたい Tweet ID
id = "265073274885636096"
# OAUTH 認証キー (自分で認証したキーを入れる)
@lpm11
lpm11 / gist:3262141
Created August 5, 2012 06:03
Gmail のエクスポートしたフィルタを適当に sort して出力
#!/bin/env ruby
#-*- coding: utf-8 -*-
require("rexml/document");
def compare_entry_by_property_value(e1,e2,property)
p1 = REXML::XPath.first(e1,"apps:property[@name='#{property}']");
p2 = REXML::XPath.first(e2,"apps:property[@name='#{property}']");
return p1.attribute("value").value <=> p2.attribute("value").value if (p1 && p2);
return -1 if (p1);
return +1 if (p2);
@lpm11
lpm11 / kml2evernote.rb
Created March 24, 2012 15:00
OruxMaps が吐き出した KML を Evernote 形式に一括変換
#!/bin/env ruby
#-*- coding: utf-8 -*-
require("rubygems");
require("term/ansicolor");
require("term/ansicolor/logger");
require("optparshie");
require("date");
require("digest/md5");
require("base64");
require("cgi");
@lpm11
lpm11 / gist:1737954
Created February 4, 2012 13:49
Evernote のノート名一括置換
#!/bin/env ruby
#-*- coding: utf-8 -*-
require("rubygems");
require("appscript");
rules = {};
File.open("なんとやら.tsv","r").each { |line|
line.chomp!();
f,t = line.split(/\t/,2);
rules["#{f}"] = t;