Skip to content

Instantly share code, notes, and snippets.

View polamjag's full-sized avatar
:shipit:
 

Satoru Abe polamjag

:shipit:
 
View GitHub Profile
@polamjag
polamjag / amzn-drpepper-price-bot.rb
Last active December 26, 2015 09:29
ドクペ価格botを支える技術
# encoding: utf-8
require "open-uri"
require "rubygems"
require "nokogiri"
require "kconv"
require "twitter"
# load OAuth keys and tokens
load File.expand_path(File.dirname(__FILE__) + '/key.rb')
@polamjag
polamjag / heating.sh
Last active December 29, 2015 12:58
コンピュータのあたたかさ
#!/bin/sh
echo 'Start heating!'
# get number of cpu cores
cores=`cat /proc/cpuinfo | grep -c processor`
pids=()
while [ ${#pids[*]} -lt $cores ] ; do
@polamjag
polamjag / 30-logitechtrackball.conf
Created December 22, 2013 18:11
logitech USB Trackball xorg.conf
Section "InputClass"
Identifier "Logitech USB Trackball Integration"
MatchProduct "Logitech USB Trackball"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "ButtonMapping" "1 8 9 4 5 6 7 3 2"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "3"
Option "ZAxisMapping" "4 5"
@polamjag
polamjag / tlp
Last active June 26, 2023 20:11
/etc/default/tlp for my ThinkPad x230 w/ Arch Linux
# ------------------------------------------------------------------------------
# tlp - Parameters for power save
# Hint: some features are disabled by default, remove the leading # to enable them
# Set to 0 to disable/1 to enable TLP
TLP_ENABLE=1
# Seconds laptop mode has to to wait after the disk goes idle before doing a sync.
# Non-zero value enables, zero disables laptop mode.
@polamjag
polamjag / .xprofile
Created June 23, 2014 05:20
.xprofile とか .xinitrc に書く fcitx 指定するアレ
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
@polamjag
polamjag / arch-ja-ime.md
Created August 30, 2014 13:49
Using Japanese Input Method on Arch Linux (and some Arch-based distros) and some tips

I recommend fcitx-mozc for Japanese Input Method in Arch or Angergos, and I'm also using it. I think fcitx-mozc is better than ibus-mozc for some reasons. First one is that there are official binary package of fcitx-mozc, but ibus-mozc is only in AUR. Secondly, fcitx is more configurable than ibus.

Please see https://wiki.archlinux.org/index.php/Fcitx for way of installing and configuring fcitx.

After that, you can configure alternative keybind of "Zenkaku-Hankaku." Since I'm using US keyboard, I set C-\ (Control + \) for Zenkaku-Hankaku key. The option is at

"Configure" (at fcitx's menu, appears after right-clicking fcitx icon or run `fcitx-configtool` on terminal) > "Global Config" > "Trigger Input Method."

You can switch on or off to use input method with key on that config, or switch between all of installed input methods.

@polamjag
polamjag / d250g2.html
Last active August 29, 2015 14:06
new gen of d250g2.com
<html lang="ja">
<head>
<meta charset="utf-8">
<title>d250g2</title>
<style type="text/css">
html, body, img {
margin: 0;
padding :0;
}
html {
@polamjag
polamjag / gist:69c5362b73a3dc01184c
Created November 17, 2014 08:58
mikutter crash on 2014-11-17
/opt/mikutter/core/utils.rb:172: [BUG] rb_gc_mark(): 0x000000035deac8 is T_NONE
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0011 p:---- s:0056 e:000055 CFUNC :lambda
c:0010 p:0007 s:0053 E:000918 METHOD /opt/mikutter/core/utils.rb:172
c:0009 p:0011 s:0046 e:000045 METHOD /opt/mikutter/core/utils.rb:201
c:0008 p:0018 s:0040 e:000039 METHOD /opt/mikutter/core/mui/cairo_cell_renderer_message.rb:116
c:0007 p:0103 s:0035 e:000032 METHOD /opt/mikutter/core/mui/cairo_cell_renderer_message.rb:152
c:0006 p:0051 s:0028 e:000027 METHOD /opt/mikutter/core/mui/cairo_cell_renderer_message.rb:132 [FINISH]
@polamjag
polamjag / instruments.md
Created December 20, 2014 05:50
機材一覧

マイク

  • BEHRINGER XM8500 * 1
  • Classic Pro CM5 * 2

ミキサー、I/F など

  • BEHRINGER XENYX1202 (12in4out)
  • TASCAM US-144mkii (4in4out)
  • Traktor Audio 2 (0in4out)
@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.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 で合計金額を表示
//