Skip to content

Instantly share code, notes, and snippets.

View rummelonp's full-sized avatar
🐈‍⬛
ニャーン

Kazuya Takeshima rummelonp

🐈‍⬛
ニャーン
View GitHub Profile
@rummelonp
rummelonp / amazon-calc.js
Last active June 13, 2017 16:35 — forked from polamjag/amazon-calc.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン) (月枚に出すよう変更)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//
@rummelonp
rummelonp / application_service.rb
Created March 24, 2017 09:40
application_service.rb
class ApplicationService
include ActiveModel::Model
def submit(params = {})
params.each do |key, value|
self.public_send("#{key}=", value)
end
self
end
require 'formula'
class Pict < Formula
head do
url "https://github.com/Microsoft/pict.git"
end
def install
system "make"
bin.install "pict" => "pict"
!function(){var t=document.getSelection().toString(),o=(t?'"'+t+'" / ':"Now Browsing: ")+document.title+" "+location.href,e="tweetbot:///post?text="+encodeURIComponent(o);location.href=e}();
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE keyboard PUBLIC "" "file://localhost/System/Library/DTDs/KeyboardLayout.dtd">
<!--Created by Ukelele version 2.2.8 on 2015-04-03 at 16:32 (GMT+9)-->
<!--Last edited by Ukelele version 2.2.8 on 2015-04-03 at 16:35 (GMT+9)-->
<keyboard group="0" id="4139" name="Emacs" maxout="1">
<layouts>
<layout first="0" last="17" modifiers="f4" mapSet="16c"/>
<layout first="18" last="18" modifiers="f4" mapSet="984"/>
<layout first="21" last="23" modifiers="f4" mapSet="984"/>
<layout first="30" last="30" modifiers="f4" mapSet="984"/>
@rummelonp
rummelonp / Mac OS X 10_5_ Emacs.xml
Last active March 11, 2021 08:11
~/Library/Application\ Support/Google/AndroidStudio4.1/keymaps/Mac\ OS\ X\ 10_5_\ Emacs.xml
<keymap version="1" name="Mac OS X 10.5+ Emacs" parent="Mac OS X 10.5+">
<action id="$Paste">
<keyboard-shortcut first-keystroke="meta v" />
<keyboard-shortcut first-keystroke="ctrl y" />
</action>
<action id="$Redo">
<keyboard-shortcut first-keystroke="shift meta z" />
<keyboard-shortcut first-keystroke="shift alt back_space" />
<keyboard-shortcut first-keystroke="ctrl alt underscore" />
<keyboard-shortcut first-keystroke="ctrl alt slash" />
module Natto
Node = Struct.new(:surface, :part, :part_sub1, :part_sub2, :part_sub3, :conjugation1, :conjugation2, :original, :read, :pron)
class MeCab
def parse_to_node(text)
nodes = parse(text).split("\n").map(&:strip)
nodes = nodes.map do |node|
next if node == 'EOS'
surface, feature = *node.split("\t")
Node.new(surface, *feature.split(','))
@rummelonp
rummelonp / GIF-Screencast-OSX.md
Created December 24, 2015 05:27 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@rummelonp
rummelonp / Gemfile
Created December 17, 2015 11:03
rails new した後に入れたら便利そうなやつとか
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'active_decorator'
gem 'coffee-rails', '~> 4.1.0'
gem 'enumerize'
gem 'figaro'
gem 'jquery-rails'
gem 'kaminari'