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
lazy val hello = taskKey[Unit]("say hello to you") | |
lazy val root = (project in file(".")) | |
.settings( | |
hello := {Hello.say} | |
) |
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
lazy val hello = inputKey[Unit]("say hello to you") | |
import complete.DefaultParsers._ | |
lazy val root = (project in file(".")) | |
.settings( | |
hello := { | |
val args: Seq[String] = spaceDelimited("<arg>").parsed | |
println(args) | |
} | |
) |
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
object Hello { | |
def say = println("Hello") | |
} |
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
import java.io.File | |
object Bower { | |
def update = { | |
Process(Seq("bower","update"), new File("frontBuildTools")).! | |
} | |
} |
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
{ | |
"name": "Page Redder", | |
"description": "Make the current page red", | |
"version": "2.0", | |
"permissions": [ | |
"activeTab" | |
], | |
"applications": { | |
"gecko": { | |
"id": "redder@mozilla.org" |
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 -*- | |
import re | |
import sys | |
from argparse import ArgumentParser | |
r_table = re.compile("CREATE TABLE `?([\w_]+)`? \((.*)\)(.*?);$") | |
caseSuffix = "Dto" | |
class Table: | |
def __init__(self, query): |
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 com.cyberz.foxapi.dao | |
import scala.slick.jdbc.JdbcBackend._ | |
/** | |
* Created by Yuto Suzuki on 15/03/06. | |
*/ | |
object BaseTransaction { | |
/** |
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
def googlePlayIconUrl(appIdentifier: String): Option[String] = { | |
val googleImgTag = "div.cover-container img.cover-image" | |
def googlePlayUrl(appIdentifier: String): String = s"https://play.google.com/store/apps/details?id=$appIdentifier" | |
try { | |
val doc = Jsoup.connect(googlePlayUrl(appIdentifier)).get | |
Option(doc.select(googleImgTag).first.attr("src")) | |
} catch { | |
case e: HttpStatusException => { | |
// loggerに関しては、適当なものを定義してください。 | |
logger.error(s"GooglePlayにアクセスできません。$appIdentifier") |
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 | |
import doctest | |
import MySQLdb | |
from influxdb import InfluxDBClient as ifdb | |
from datetime import datetime | |
DATA = "123456789012345678901234567890123456789012345678901234567890" | |
COUNT = 10000 * 1 |
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
import java.io.File | |
import com.decodified.scalassh._ | |
import com.typesafe.config.ConfigFactory | |
import org.slf4j.LoggerFactory | |
import spray.http.StatusCodes | |
import scala.io.Source | |
/** | |
* Created by Yuto Suzuki on 2014/12/24. | |
*/ | |
object SshDao { |