Skip to content

Instantly share code, notes, and snippets.

View masoo's full-sized avatar
🐔
In the chicken

FUNABARA Masao masoo

🐔
In the chicken
View GitHub Profile
@masoo
masoo / secret_protection.rb
Created December 6, 2013 15:48
masoojer で編集中の文章の秘密を保護する。
# -*- coding: utf-8 -*-
module Masoojer
def self.secret_protection(begin_position, end_position)
replace_string = "■" * (end_position - begin_position)
$azukiControl.Document.Replace(replace_string, begin_position, end_position)
end
end
menu_sp = System::Windows::Controls::MenuItem.new()
@masoo
masoo / kancolle.rb
Created December 7, 2013 08:20
masoojer で艦隊これくしょんをする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.kancolle
@webbrowser = System::Windows::Controls::WebBrowser.new
@webbrowser.Name = "KancolleWebBrowser"
@webbrowser.Height = System::Double.NaN
@masoo
masoo / dqmp.rb
Created December 11, 2013 00:35
masoojer でドラゴンクエスト モンスターパレードをする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.dqmp
@webbrowser = System::Windows::Controls::WebBrowser.new
@webbrowser.Name = "DqmpWebBrowser"
@webbrowser.Height = System::Double.NaN
@masoo
masoo / full_screen.rb
Created December 19, 2013 04:47
masoojer の画面を最大化にする。
# -*- coding: utf-8 -*-
require 'mscorlib'
require 'System'
require 'PresentationFramework'
module Masoojer
def self.full_screen
if @full_screen_toggle then
self.full_screen_off
else
@masoo
masoo / masoojer_script.rb
Created March 21, 2014 08:06
masoojer に張り付けて実行するサンプルスクリプト
require 'PresentationFramework'
w = System::Windows::Window.new
w.width = 400
w.height = 300
w.Content = System::String.new("Hello, World!!")
w.show_dialog
@masoo
masoo / rubyhighlighter.rb
Created April 5, 2014 13:21
ruby 用シンタックスハイライト
# -*- coding: utf-8 -*-
module Masoojer
require 'System'
require 'mscorlib'
require 'WindowsBase'
require 'PresentationCore'
require 'PresentationFramework'
require "Sgry.Azuki"
require "System.Drawing"
@masoo
masoo / install_log_centos6_5_vagrant.txt
Last active August 29, 2015 13:59
CentOS 6.5 を vagrant 風にした時のログ
install_log_centos6_5_vagrant.txt
CentOS 6.5 を vagrant 風にした時のログ
## インストール
http://masoojp.blogspot.jp/2014/02/centos-65-x8664-minimal.html
## root でログイン
## ユーザーを追加
$ adduser vagrant
@masoo
masoo / DateSortFilter.rb
Created April 14, 2014 00:26
jekyll Front-matter Custom attributes Sort Filter
# -*- coding: utf-8 -*-
module DateSortFilter
def date_sort_ascending(input)
input.sort {|a, b|
value = 0
left_key = a.to_liquid["date"]
right_key = b.to_liquid["date"]
if left_key.nil? && right_key.nil?
value = 0
@masoo
masoo / font-subset.rb
Created October 4, 2014 11:37
指定ディレクトリ以下にある htmlファイル内の文字一覧を出力するスクリプト
# coding: utf-8
require 'find'
target_dir = ARGV[0]
all_string = []
Find.find(target_dir) do |file|
if File.extname(file) == ".html"
content = File.open(file).read
file_string_array = content.split('')
@masoo
masoo / Dockerfile
Last active August 5, 2017 17:18
masoo/ubuntu-rbenv の source, Ubuntu 17.04 に rbenv をインストールした Dockerfile
# Pull base image.
FROM ubuntu:17.04
MAINTAINER FUNABARA Masao
# Install Ruby
RUN \
DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev nodejs && \