View kafka_cluster.yml
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
version: '2' | |
services: | |
zookeeper: | |
image: 'docker.io/bitnami/zookeeper:3-debian-10' | |
ports: | |
- '2181:2181' | |
environment: | |
- ALLOW_ANONYMOUS_LOGIN=yes | |
kafka: |
View bigquery.sql
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
WITH a AS ( SELECT 1 AS a, 2 AS b ) | |
SELECT a FROM a ; | |
-- result:: | |
-- | Row | a.a | a.b | | |
-- | 1 | 1 | 2 | | |
-- result (json):: | |
-- [ | |
-- { |
View gist:790835
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
// -*- mode: c++ -*- | |
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2011/01/21 | |
**/ | |
#include <SPI.h> | |
#include <Ethernet.h> |
View gist:769513
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
// -*- mode: c++ -*- | |
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2011/01/12 | |
**/ | |
#include <SPI.h> |
View fluentd-pubsub-bigquery.txt
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
fluent-plugin-bigquery = 0.4.4 | |
google-api-client ~> 0.9.3 | |
fluent-plugin-gcloud-pubsub = 0.0.5 | |
gcloud = 0.6.3 | |
google-api-client ~> 0.8.3 | |
ここで不整合が起こるので、fluent-plugin-bigqueryのバージョンを下げて解決 | |
fluent-plugin-bigquery = 0.2.14 |
View gist:ec04576a135e0375608ef561bfb7a9fa
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
$ scala | |
Welcome to Scala version 2.11.6 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_80). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> import java.util.{TimeZone, Calendar} | |
import java.util.{TimeZone, Calendar} | |
scala> TimeZone.getDefault | |
res0: java.util.TimeZone = sun.util.calendar.ZoneInfo[id="Etc/UTC",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null] |
View concat_gzip.txt
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
$ cat <<EOF > 123.txt | |
> 1 | |
> 2 | |
> 3 | |
> EOF | |
$ gzip 123.txt | |
$ cat 123.txt.gz 123.txt.gz > 123123.txt.gz | |
$ gunzip -c 123123.txt.gz | |
1 | |
2 |
View gist:834832
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
library("rjson") | |
# use rjson | |
map_data <- fromJSON(paste(readLines("http://maps.google.com/maps/api/elevation/json?path=43.0,141.4|26.2,127.7&samples=500&sensor=false"), collapse="")) | |
# get a data from Google Elevation API | |
# convert JSON data into R object using fromJSON() | |
# toJSON(): convert R object into JSON data | |
elevation_data <- lapply(map_data$result, function(x){x$elevation}) |
View gist:744925
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
/** | |
Copyright: (c) SAEKI Yoshiyasu | |
License : MIT-style license | |
<http://www.opensource.org/licenses/mit-license.php> | |
last updated: 2010/12/03 | |
**/ | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <string.h> |
View gist:8627514
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
> var msg = new SpeechSynthesisUtterance() | |
undefined | |
> msg | |
SpeechSynthesisUtterance {onboundary: null, onmark: null, onresume: null, onpause: null, onerror: null…} | |
lang: "" | |
onboundary: null | |
onend: null | |
onerror: null | |
onmark: null |
NewerOlder