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 2011 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// HTTP reverse proxy handler | |
package goengine | |
import ( | |
"io" |
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
SELECT | |
protoPayload.authenticationInfo.principalEmail, | |
protoPayload.serviceData.jobCompletedEvent.job.jobName.jobId, | |
protoPayload.serviceData.jobCompletedEvent.job.jobStatistics.billingTier, | |
protoPayload.serviceData.jobCompletedEvent.job.jobStatistics.totalBilledBytes, | |
ROUND(((protoPayload.serviceData.jobCompletedEvent.job.jobStatistics.totalBilledBytes*5)/1000000000000),2) Cost_In_Dollars_Now, | |
ROUND(((protoPayload.serviceData.jobCompletedEvent.job.jobStatistics.totalBilledBytes*(5*protoPayload.serviceData.jobCompletedEvent.job.jobStatistics.billingTier))/1000000000000),2) Cost_In_Dollars_New, | |
protoPayload.serviceData.jobCompletedEvent.job.jobConfiguration.query.query, | |
FROM TABLE_DATE_RANGE(bigquery.cloudaudit_googleapis_com_data_access_, DATE_ADD(CURRENT_TIMESTAMP(), -3, 'DAY'), CURRENT_TIMESTAMP()) | |
WHERE |
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 org.sinmetal.controller; | |
import java.io.*; | |
import java.util.*; | |
import org.slim3.controller.*; | |
import com.google.appengine.api.search.*; | |
public class SearchStorageMonitorController extends SimpleController { |
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 ( | |
"encoding/json" | |
"fmt" | |
"strconv" | |
"time" | |
) | |
type Hoge struct { |
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
SELECT | |
SUBSTR( | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.id'), | |
2, LENGTH(JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.id')) - 2)AS id, | |
SUBSTR( | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.kind'), | |
2, LENGTH(JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.kind')) - 2)AS kind, | |
SUBSTR( | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.selfLink'), | |
2, LENGTH(JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.selfLink')) - 2)AS selfLink, |
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
SELECT | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.id') AS id, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.kind') AS kind, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.selfLink') AS selfLink, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.name') AS name, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.bucket') AS bucket, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.generation') AS generation, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.metageneration') AS metageneration, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE__.contentType') AS contentType, | |
JSON_EXTRACT(REGEXP_REPLACE(textPayload, r'.*{"__SAMPLE__', '{"__SAMPLE__'), '$.__SAMPLE_ |
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
SELECT | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.id') AS id, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.organizationId') AS organizationId, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.title') AS title, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.description') AS description, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.url') AS url, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.startAt') AS startAt, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.createdAt') AS createdAt, | |
JSON_EXTRACT(protoPayload.line.logMessage, '$.__DS__KIND__PUGEVENT__.updatedAt') AS updatedAt, | |
protoPayload.line.logMessage AS source |
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 org.sinmetal.controller; | |
import java.io.*; | |
import java.util.*; | |
import java.util.logging.*; | |
import org.codehaus.jackson.*; | |
import org.codehaus.jackson.map.*; | |
import org.sinmetal.meta.*; | |
import org.sinmetal.model.*; |
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
#!/usr/local/bin/zsh | |
while true; | |
do | |
curl $1 | |
sleep 1 | |
done |
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
SELECT | |
year, month, day, | |
count(text) AS count | |
FROM | |
( | |
SELECT | |
YEAR(DATE_ADD (createdAt, 9, "HOUR")) AS year, | |
MONTH(DATE_ADD (createdAt, 9, "HOUR")) AS month, | |
DAY(DATE_ADD (createdAt, 9, "HOUR")) AS day, | |
text |