This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tr = log --graph --all --format=\"%x09%C(cyan bold)%an%Creset%x09%C(yellow)%h%Creset %C(magenta reverse)%d%Creset %s\" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
;; init.el | |
;; | |
;; -*- mode: emacs-lisp; coding: utf-8; indent-tabs-mode: nil -*- | |
;; Language | |
(set-language-environment 'Japanese) | |
;; Set alt as Meta key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"github.com/kokardy/listing" | |
"runtime" | |
"sync" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://tools.oesf.biz/android-MNC/xref/com/android/server/fingerprint/FingerprintService.java | |
===== | |
532 @Override | |
533 // Binder call | |
534 public void authenticate(final IBinder token, final long opId, final int groupId, | |
535 final IFingerprintServiceReceiver receiver, final int flags, String opPackageName) { | |
536 checkPermission(USE_FINGERPRINT); | |
537 if (!canUserFingerPrint(opPackageName)) { | |
538 return; | |
539 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#encoding: utf-8 | |
class String | |
def make_ngram(n) | |
ary = self.split(//) | |
ngram_ary = [] | |
p = ary.length | |
for i in 0..(p - n) do | |
ngram_ary << ary[i...(i + n)] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def self.foo(method) | |
define_method(method) do | |
puts "Foo##{method} called." | |
end | |
end | |
foo :bar | |
foo :baz | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Bar | |
class << self | |
def self.bar(method) | |
define_method(method) do | |
puts "Bar.#{method} called." | |
end | |
end | |
bar :foo | |
bar :baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#tweetから記事リンクがあるものだけを取得する。 | |
#coding utf-8 | |
require 'twitter' | |
require 'net/http' | |
require 'uri' | |
class LinkGrabber | |
def initialize(user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: UTF-8 | |
require 'rss' | |
class RSSChecker | |
def initialize | |
@blogs = | |
[ | |
"http://lifehack2ch.livedoor.biz/index.rdf", | |
"http://www.scienceplus2ch.com/index.rdf", | |
"http://blog.livedoor.jp/domesaka/index.rdf", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<string-array name="sample"> | |
<item>FOO</item> | |
<item>BAR</item> | |
<item>BAZ</item> | |
</string-array> | |
</resources> |
OlderNewer