Skip to content

Instantly share code, notes, and snippets.

View pocke's full-sized avatar
⌨️
Pocke is typing...

Masataka Pocke Kuwabara pocke

⌨️
Pocke is typing...
View GitHub Profile
@pocke
pocke / tw_bookmarklet.js
Last active December 27, 2015 23:39
tweet page
javascript:(function(){ var pageTITLE = encodeURIComponent(window.document.title); var pageURL = encodeURIComponent(window.location.href); var tweetURL = "https://twitter.com/share?text=" + pageTITLE + "&url=" + pageURL; window.open(tweetURL); })()
@pocke
pocke / togetter_all_fav.js
Last active December 27, 2015 23:39
togetterのツイートをすべてふぁぼります
$('.icon_favo').click();
$('.primary').click();
@pocke
pocke / symlink.sh
Created November 26, 2013 23:04
add symlink for busybox on Android(Nexus7)
@pocke
pocke / datejust.sh
Created December 17, 2013 13:11
時計合わせ。cronでてきとーに回そう。要root。 public domain
#!/bin/sh
ntpdate 0.jp.pool.ntp.org
hwclock --systohc --localtime
@pocke
pocke / patch.diff
Last active January 3, 2016 15:39
mikutter の Message に source の URL を含めるパッチ
diff --git a/core/lib/mikutwitter/api_call_support.rb b/core/lib/mikutwitter/api_call_support.rb
index f40f200..15c9c31 100644
--- a/core/lib/mikutwitter/api_call_support.rb
+++ b/core/lib/mikutwitter/api_call_support.rb
@@ -104,7 +104,8 @@ module MikuTwitter::ApiCallSupport
cnv = msg.convert_key(:text => :message,
:in_reply_to_user_id => :receiver,
:in_reply_to_status_id => :replyto)
- cnv[:source] = $1 if cnv[:source].is_a?(String) and cnv[:source].match(/^<a\s+.*>(.*?)<\/a>$/)
+ cnv[:source] = $2 if cnv[:source].is_a?(String) and cnv[:source].match(/^<a\s+href="(.*?)".*>(.*?)<\/a>$/)
@pocke
pocke / 20-thinkpad.conf
Created January 20, 2014 08:45
/etc/X11/xorg.conf.d/20-thinkpad.conf for ThinkPad Keyboard(55Y9003)
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint"
MatchDevicePath "/dev/input/event*"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
EndSection
@pocke
pocke / fonts.conf
Created January 24, 2014 04:40
~/.config/fontconfig/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Ricty</family>
</prefer>
</alias>
<alias>
notice: /opt/mikutter/core/plugin/command/command.rb:264:in `focus_move_to_nearest_postbox': called: given widget #<Plugin::GUI::Tab(role=tab,slug=activity)>
notice: /opt/mikutter/core/plugin/command/command.rb:267:in `focus_move_to_nearest_postbox': found postbox: nil
@pocke
pocke / nyan.rb
Last active August 29, 2015 13:56
# にゃーんっぽい正規表現
/^([にみ][ゃゅょ][あぁ]*[ーっ]*ん?っ?)+$/
p STDIN.reject{|x| x =~ /^"/ or x =~ /^\s*\n/ or x =~ /^\s*\\/}.size