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
# 作者: t_andou | |
# | |
# このスクリプトは、カレントディレクトリ以下のすべてのファイルの内容を再帰的に読み込み、 | |
# 1つの大きなテキストファイルにまとめるためのものです。 | |
# | |
# 使い方: | |
# 1. このスクリプトをプロジェクトのルートディレクトリに配置します。 | |
# 2. コマンドラインから `python merge_all.py` を実行します。 | |
# (merge_all.py は実際のスクリプトファイル名に置き換えてください) | |
# 3. スクリプトが実行されると、カレントディレクトリ以下のすべてのファイルの内容が |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: job-wq | |
spec: | |
# 並列実行数 | |
parallelism: 3650 | |
template: | |
metadata: | |
name: job-wq |
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
# 参考:https://tkzo.jp/blog/use-persistent-volumes-in-gke/ | |
# volume.yaml | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
# 任意のPV名を設定します | |
name: persistvol | |
spec: | |
capacity: | |
# 作成したボリュームの容量と合わせます |
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
# キューを扱うNodeのためのNodePool | |
gcloud container clusters create autoscaled-cluster \ | |
--num-nodes 2 \ | |
--machine-type=n1-standard-1 \ | |
--zone us-west1-a --disk-size=10\ | |
# キューを処理するためのNodePool。preemptibleにしている。 | |
gcloud container node-pools create preemptible-pool96 \ | |
--cluster autoscaled-cluster --preemptible --num-nodes 0 \ | |
--enable-autoscaling --min-nodes 0 --max-nodes 960 \ |
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
#!/bin/sh | |
# | |
# YYYY-MM-DD | |
# | |
STARTDATE=20100101 | |
ENDDATE=20191005 | |
CURRENTDATE=$STARTDATE |
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 sys | |
import qrcode | |
# QRコードを作る場合 | |
URLarray = ['http://google.com','http://yahoo.co.jp'] | |
for i, URL in enumerate(URLarray): | |
img = qrcode.make(URL) # ''内の文字をQRコードに変換 | |
img.save('qr_img' + str(i) + '.png') # QRコードに名前をつけて保存 |
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 sys | |
import re | |
from urllib2 import urlopen as U, Request as R | |
from json import loads as J | |
API_KEY = "ここはGoogleのAPIを取得して使う" | |
API = "https://www.googleapis.com/urlshortener/v1/url?key=" + API_KEY |
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
const DashButton = require('dash-button'); | |
const {exec} = require('child_process'); | |
const do1 = new DashButton("xx:xx:xx:xx:xx:xx"); //じゃがりこ | |
const re = new DashButton("xx:xx:xx:xx:xx:xx"); //パンテーン | |
const mi = new DashButton("xx:xx:xx:xx:xx:xx"); //ヘルシア | |
const fa = new DashButton("xx:xx:xx:xx:xx:xx"); //カロリーメイト | |
const so = new DashButton("xx:xx:xx:xx:xx:xx"); //エヴィアン | |
const ra = new DashButton("xx:xx:xx:xx:xx:xx"); //アマゾンベーシック | |
const si = new DashButton("xx:xx:xx:xx:xx:xx"); //シーブリーズ |
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 | |
from scapy.all import * | |
from picraft import World, Vector, Block | |
world = World("MineCraftServer IP") | |
def arp_display(pkt): | |
if pkt[ARP].op == 1: | |
if pkt[ARP].hwsrc == 'Your AmazonDashButton's Mac Address': | |
world.player.pos = Vector(0, 300, 0) |
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
<?php | |
$json_string = file_get_contents('php://input'); | |
$json_object = json_decode($json_string); | |
$AndoUserID = '<<LineUserID>>'; | |
error_log("callback start."); | |
foreach ($json_object->events as $event) { | |
if('message' == $event->type){ | |
if ($event->source->userId == $AndoUserID) { | |
if ($event->message->text =='おは'){ |
NewerOlder