Skip to content

Instantly share code, notes, and snippets.

@chkk525
chkk525 / exportResponsiveSearchAdsToSheet.gs
Created February 18, 2023 12:55
Responsive search Adsのheadlineとdescriptionのtextとasset idを取得するAdwords Script
function main() {
const sheetUrl = "SHEET_URL";
const spreadsheet = SpreadsheetApp.openByUrl(sheetUrl);
const targetSheet = spreadsheet.getSheetByName("RSA");
const report = AdWordsApp.report(
'SELECT ResponsiveSearchAdDescriptions, ResponsiveSearchAdHeadlines ' +
'FROM AD_PERFORMANCE_REPORT ' +
'WHERE AdType = RESPONSIVE_SEARCH_AD ' +
'DURING LAST_7_DAYS'
);
# https://reeborg.ca/reeborg.html
DIR_PATTERNS = [
(0, 1), # ↑
(-1, 0), # ←
(0, -1), # ↓
(1, 0) # →
]
dir_idx = None
def face_north():
@chkk525
chkk525 / tepco_houry.js
Created January 3, 2021 07:48
くらしTEPCO webからhourlyのデータを過去Nヶ月分とってくるスクリプト。なぜかうまくいかない。(csvが空....)
LAST_N_MONTH = 1
const days = () => {
const result = []
for (let m of [...Array(LAST_N_MONTH).keys()]) {
const today = new Date()
const dt = new Date(today.setMonth(today.getMonth() - m))
const lastDay = new Date(dt.getFullYear(), dt.getMonth() + 1, 0).getDate()
for (let d of [...Array(lastDay).keys()].map(d => d + 1).sort((a, b) => b - a)) {
result.push({
@chkk525
chkk525 / tepco_report.js
Created January 3, 2021 07:44
くらしTEPCO webからデイリーの消費電力のデータを落としてくるスクリプト
const get_login_options = () => {
const LOGIN_URL = "https://www.kurashi.tepco.co.jp/kpf-login";
const payload_data = {
ACCOUNTUID: 'test@gamil.com',
PASSWORD: 'secure-password-1234',
HIDEURL: '/pf/ja/pc/mypage/home/index.page?',
LOGIN: 'EUAS_LOGIN'
};
@chkk525
chkk525 / .Brewfile
Last active January 28, 2021 13:49
### Tap ###
tap "argon/mas"
tap "buo/cask-upgrade"
tap "delphinus/sfmono-square"
tap "ethereum/ethereum"
tap "fishtown-analytics/dbt"
tap "github/gh"
tap "heroku/brew"
tap "homebrew/bundle"
### Tap ###
tap "argon/mas"
tap "buo/cask-upgrade"
tap "caskroom/cask"
tap "caskroom/versions"
tap "caskroom/fonts"
tap "ethereum/ethereum"
tap "fishtown-analytics/dbt"
tap "heroku/brew"
tap "homebrew/bundle"
### Tap ###
tap "argon/mas"
tap "buo/cask-upgrade"
tap "caskroom/cask"
tap "caskroom/versions"
tap "caskroom/fonts"
tap "ethereum/ethereum"
tap "fishtown-analytics/dbt"
tap "heroku/brew"
tap "homebrew/bundle"
### Tap ###
tap "argon/mas"
tap "buo/cask-upgrade"
tap "caskroom/cask"
tap "caskroom/versions"
tap "caskroom/fonts"
tap "ethereum/ethereum"
tap "fishtown-analytics/dbt"
tap "heroku/brew"
tap "homebrew/bundle"
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@chkk525
chkk525 / cloudSettings
Last active February 6, 2021 04:58
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-02-06T04:56:37.489Z","extensionVersion":"v3.4.3"}