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
#!perl | |
# 読み飛ばす | |
while (<>) { | |
last if /<div class="horseList">/; | |
} | |
# テーブルをばらす | |
while (<>) { | |
if (/<h4 class="name">/) { |
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
#python3 | |
import time | |
import CO2Meter | |
sensor = CO2Meter.CO2Meter("/dev/hidraw0") | |
_LIMIT = 10 | |
def get_sensor(): | |
co2 = None |
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" | |
"sync" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. |
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" | |
"golang.org/x/tour/tree" | |
) | |
// Walk walks the tree t sending all values | |
// from the tree to the channel ch. | |
func Walk(t *tree.Tree, ch chan int) { |
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
2017-01-18 11:52:06 +0900 [info]: reading config file path="/etc/td-agent/td-agent.conf" | |
2017-01-18 11:52:06 +0900 [info]: starting fluentd-0.12.31 | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-mixin-config-placeholders' version '0.4.0' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-mixin-plaintextformatter' version '0.2.6' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-kafka' version '0.5.0' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-kafka' version '0.4.1' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-mongo' version '0.7.16' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-rewrite-tag-filter' version '1.5.5' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-s3' version '0.8.0' | |
2017-01-18 11:52:06 +0900 [info]: gem 'fluent-plugin-scribe' version '0.10.14' |
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
2016-11-21 15:53:47,377 WARN org.apache.hadoop.yarn.webapp.GenericExceptionHandler: INTERNAL_SERVER_ERROR | |
java.lang.RuntimeException: java.io.IOException: maxStamp is smaller than minStamp | |
at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:205) | |
at org.apache.phoenix.execute.BaseQueryPlan.iterator(BaseQueryPlan.java:161) | |
at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:253) | |
at org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:243) | |
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) | |
at org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:242) | |
at org.apache.phoenix.jdbc.PhoenixPreparedStatement.executeQuery(PhoenixPreparedStatement.java:186) | |
at org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor.getAggregateMetricRecords(PhoenixHBaseAccessor.java:633) |
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
defmodule Hoge do | |
@flag false | |
defmacro ifa(a, exp) do | |
if (Macro.expand_once(a, __CALLER__)), do: exp | |
end | |
def main do | |
if (@flag), do: IO.puts 123 | |
ifa (@flag), do: IO.puts 456 | |
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
lazy val codeGenTask2 = TaskKey[Unit]("hoge", "description") | |
codeGenTask2 := { | |
import scalikejdbc.mapper.SbtKeys._ | |
scalikejdbcCodeGeneratorAll.in(Compile).value.apply(scalikejdbcJDBCSettings.in(Compile).value, scalikejdbcGeneratorSettings.in(Compile).value).foreach { g => | |
g.writeModel() | |
// g.writeSpec(g.specAll()) | |
} | |
} | |
compile in Compile <<= (compile in Compile).dependsOn(codeGenTask2) |
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 removeTestTask = TaskKey[Unit]("removeTest", "Deletes scalikeJDBC test file") | |
removeTestTask := { | |
println("remove test files.") | |
sbt.IO.delete(new File("src/test/scala/path/to/generated/code")) | |
} | |
compile in Compile <<= (compile in Compile).dependsOn(removeTestTask) | |
scalikejdbcSettings | |
compile in Compile <<= (compile in Compile).dependsOn(scalikejdbc.mapper.SbtKeys.scalikejdbcGenAllForce.in(Compile).toTask("")) |
NewerOlder