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 / bench_test.go
Created March 17, 2015 23:31
strconv.AppendIntはやい
package main
import (
"fmt"
"strconv"
"testing"
)
func F1(n int) string {
res := ""
Section "InputClass"
Identifier "Logitech M705"
MatchProduct "Logitech M705"
Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 2"
EndSection
@pocke
pocke / main_test.go
Created July 5, 2015 05:32
golang reslice sample
package main
import (
"reflect"
"testing"
)
func TestReSlice(t *testing.T) {
check := func(l, r []int) {
if !reflect.DeepEqual(l, r) {
@pocke
pocke / test.rb
Last active August 29, 2015 14:26
for ruby_hl_lvar.vim
require 'stringio'
module Vim
end
require '~/.vim/bundle/ruby_hl_lvar.vim/autoload/ruby_hl_lvar.vim.rb'
$o = STDOUT
class RubyHlLvar::Extractor
@pocke
pocke / mikutter-dockern.rb
Last active August 29, 2015 14:26
「Docker」 を含むツイートがTLに流れてきたら「どっかーん!」とリプライを送るmikutterプラグイン
Plugin.create(:dockern) do
on_appear do |ms|
ms.each do |m|
if m.message.to_s =~ /[dD]ocker/
Service.primary.post(message: "@#{m.user.idname} どっかーん!", replyto: m)
end
end
end
end
@pocke
pocke / gist-file0.txt
Created August 7, 2015 11:13
libmtp out
libmtp version: 1.1.9
Listing raw device(s)
Device 0 (VID=04c5 and PID=140e) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
04c5:140e @ bus 1, dev 2
Attempting to connect device(s)
Android device detected, assigning default bug flags
@pocke
pocke / gray_protected_users.rb
Last active September 30, 2016 14:50 — forked from penguin2716/gray_protected_users.rb
鍵垢のツイート背景をグレーにするmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :gray_protected_users do
UserConfig[:protected_users_background_color] ||= [0xcccc,0xcccc,0xcccc]
filter_message_background_color do | mp, array |
if mp.message.user[:protected] == true && !Service.services.map(&:user).include?(mp.message.user.idname)
array = UserConfig[:protected_users_background_color]
end
[mp, array]
end
@pocke
pocke / j.rb
Last active August 29, 2015 14:27
json parser
module J
module_function
def parse(j);eval(j) end
def null;nil end
end
p J.parse(STDIN.read)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff --git a/music-players.h.orig b/music-players.h
index dd3f8b8..c6090c8 100644
--- a/music-players.h.orig
+++ b/music-players.h
@@ -1218,6 +1218,7 @@
* Fujitsu devices
*/
{ "Fujitsu, Ltd", 0x04c5, "F903iX HIGH-SPEED", 0x1140, DEVICE_FLAG_NONE },
+ { "Fujitsu, Ltd", 0x04c5, "EM01F", 0x140e, DEVICE_FLAG_NONE },
// Reported by Thomas Bretthauer