Skip to content

Instantly share code, notes, and snippets.

View masaakif's full-sized avatar

fujiwara-masaaki masaakif

View GitHub Profile
@masaakif
masaakif / youtube_hd_suite.user.js
Created June 13, 2014 12:29
YouTube HD Suite clone
// ==UserScript==
// @name YouTube HD Suite
// @namespace http://creazy.net/
// @description Perfect package to enjoy HD videos in YouTube. Always watching or downloading the highest quality format ( 4K / HD 1080p / HD 720p / HQ FLV / MP4 iPod ). Add download icons in video list page.
// @include http://*.youtube.com/*
// @include https://*.youtube.com/*
// @include http://youtube.com/*
// @include https://youtube.com/*
// @exclude http://www.youtube.com/embed/*
// @exclude https://www.youtube.com/embed/*
@masaakif
masaakif / libron3@httplibronnet.user.js
Last active August 29, 2015 14:02
libron 3.0.5.s 3
// ==UserScript==
// @name Libron_3
// @namespace http://libron.net
// @description Amazon のページから最寄りの図書館の蔵書を検索
// @author Junya Ishihara(http://champierre.com)
// @include http://www.amazon.*
// @exclude http://www.amazon.co.jp/s/*
// //exclude http://www.amazon.co.jp/gp/*
// @exclude http://www.amazon.co.jp/ref=gno_logo
// @license MIT License(http://en.wikipedia.org/wiki/MIT_License)
@masaakif
masaakif / libron2@httplibronnet.user.js
Last active August 29, 2015 14:02
Libron 3.0.5.s 2
// ==UserScript==
// @name Libron_2
// @namespace http://libron.net
// @description Amazon のページから最寄りの図書館の蔵書を検索
// @author Junya Ishihara(http://champierre.com)
// @include http://www.amazon.*
// @exclude http://www.amazon.co.jp/s/*
// ///exclude http://www.amazon.co.jp/gp/*
// @exclude http://www.amazon.co.jp/ref=gno_logo
// @license MIT License(http://en.wikipedia.org/wiki/MIT_License)
@masaakif
masaakif / libron@httplibronnet.user.js
Last active August 29, 2015 14:02
Liberon 3.0.5.s
// ==UserScript==
// @name Libron_1
// @namespace http://libron.net
// @description Amazon のページから最寄りの図書館の蔵書を検索
// @author Junya Ishihara(http://champierre.com)
// @include http://www.amazon.*
// @exclude http://www.amazon.co.jp/s/*
// ///exclude http://www.amazon.co.jp/gp/*
// @exclude http://www.amazon.co.jp/ref=gno_logo
// @license MIT License(http://en.wikipedia.org/wiki/MIT_License)
@masaakif
masaakif / flattentxt.rb
Created April 28, 2014 06:58
サブディレクトリ以下の全ての*.txtをWorking Directoryに移動する。その際にディレクトリ名もつける
Dir.glob("**/*.txt") do |f|
origname = f
newname = File.basename(f)
dirn = File.dirname(f)
dirn = dirn.gsub!("/","_")
unless dirn.nil?
newname = dirn + newname
end
puts "#{origname} -> #{newname}"
File.rename(origname, newname)
@masaakif
masaakif / changewp.rb
Last active December 29, 2015 17:19
CentOSで壁紙を変更するRubyスクリプト
#!/usr/local/rbenv/shims/ruby
require "open3"
def gen_export_dbus
pid = %x[ pgrep -u `whoami` gnome-panel ].chomp
dbus_address = ""
File.read("/proc/#{pid}/environ").split("\0").each do |line|
if /DBUS_SESSION_BUS_ADDRESS/ =~ line
dbus_address = line.split("=")[1..-1].join("=")
@masaakif
masaakif / changewp.sh
Created November 29, 2013 07:56
CentOSで壁紙を変更するシェルスクリプト
#!/bin/bash
function export_variables
{
pid=$(pgrep -u `whoami` gnome-panel )
for dbusenv in $pid; do
DBUS_SESSION_BUS_ADDRESS=$( grep -z DBUS_SESSION_BUS_ADDRESS /proc/$pid/environ | sed -e 's/DBUS_SESSION_BUS_ADDRESS=//' )
data="DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
@masaakif
masaakif / createPerf.rb
Created June 28, 2013 06:26
元データからパフォーマンスレポートを作成するスクリプト
require "rubygems"
require "zipruby"
require "win32ole"
class ExcelUtil
def initialize
@xl = nil
@filename = nil
end
@masaakif
masaakif / createTicket.rb
Created June 28, 2013 04:06
元データからExcelのチケットを作成するスクリプト
require "rubygems"
require "zipruby"
require "win32ole"
class ExcelUtil
def initialize
@xl = nil
@filename = nil
end
@masaakif
masaakif / exchlist.txt
Created June 21, 2013 00:50
Exch Listのテキスト
0 B02YZ04 MM Equity Mexico
0 B86SZR5 AT Equity Austria
0 4263304 NO Equity Norway
0 B929F46 NA Equity Netherland
0 B1YD5Q2 SE Equity --> NG
0 B1WVF68 AV Equity Vienna
0 6556325 MK Equity Malaysia
0 6147105 PM Equity Phillippine
0 6123707 NZ Equity New Zealand
0 5473113 PW Equity Poland