Skip to content

Instantly share code, notes, and snippets.

View yoshiori's full-sized avatar
🏠
Working from home

Yoshiori Shoji yoshiori

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gntp.notifier
import sys
notifications = ["OK","FAILURE","ERROR"]
growl = gntp.notifier.GrowlNotifier(
applicationName = "GrowlNotifir.py",
notifications = notifications,
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gntp.notifier
import sys
applicationIcon = 'http://cdn-ak.f.st-hatena.com/images/fotolife/k/kompiro/20100811/20100811151901.png'
notifications = ['OK','Failure','Error']
okIcon = 'https://github.com/kompiro/quick-junit/blob/master/junit.extensions.eclipse.quick.notifications/icons/tsuiteok.gif?raw=true'
/**
*
*/
package org.yoshiori.logback.filter;
import org.slf4j.Marker;
import org.slf4j.MarkerFactory;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.filter.AbstractMatcherFilter;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, simplejson, urllib2, urllib, dbm
import rfc822,logging, pickle
from pit import Pit
from time import sleep
from tw3 import MyTwitter
log = logging.getLogger()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from tw3 import MyTwitter
def main():
twitter = MyTwitter()
lists = twitter.get_list_all('yoshiori')
for i,data in enumerate(lists):
print '%-2s : %s(%s)' % (i+1,data['name'], data['member_count'])
@yoshiori
yoshiori / gmb.rb
Created March 22, 2012 06:35
github の README.rdoc をサクっとプレビューしたい
#!/usr/bin/env ruby
require 'github/markup'
require 'tempfile'
if ARGV[0] && File.exists?(file = ARGV[0])
html = GitHub::Markup.render(file)
tmp = Tempfile::new(['','.html'])
tmp.write(html)
tmp.close
@yoshiori
yoshiori / main.scala
Created March 28, 2012 06:12
括弧省略
object Main {
def main(args: Array[String]){
Main puts "Main"
this puts "this"
// puts "foo" これがダメなのなんで???
}
def puts(text:String){
println(text)
}
}
@yoshiori
yoshiori / gist:2646399
Created May 9, 2012 16:38
単に評価順じゃね???
scala> val txt = "foo" + "bar" match { case s => {println(s);s} }
foobar
txt: java.lang.String = foobar
scala> val txt = "foo" + ("bar" match { case s => {println(s);s} })
bar
txt: java.lang.String = foobar
だから
@yoshiori
yoshiori / gist:2835411
Created May 30, 2012 10:38 — forked from yamashiro/gist:2835272
Traitつき無名クラス
import org.specs2.mutable._
trait BarTrait {}
class Hoge {}
class TraitGetClassTest extends Specification {
"Trait mixin " should {
"getClass " in {
val hoge = new Hoge with BarTrait
hoge.isInstanceOf[Hoge] must beTrue
}
}
@yoshiori
yoshiori / logback.xml
Created June 27, 2012 04:58
turboFilter marker sample
<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
<Marker>MarkerExample</Marker>
<OnMatch>DENY</OnMatch>
</turboFilter>