This file contains hidden or 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/bin/python | |
# -*- coding: utf-8 -*- | |
import sys | |
from boto.ec2.connection import EC2Connection | |
from boto.ec2 import connect_to_region | |
AWS_ACCESS_KEY = "" | |
AWS_SECRET_ACCESS_KEY = "" | |
if(len(sys.argv) != 5): |
This file contains hidden or 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 gaForm = gaForm || {}; | |
jQuery(function($) { | |
var defaults = { | |
Forms:"#form", | |
Category:"analysisForm", | |
Action:"id", | |
inputRadio: true, | |
inputSelect: true, | |
inputCheckBox: true | |
}; |
This file contains hidden or 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
/* | |
* このライブラリを呼び出す前に、Google API呼び出しが必要になる | |
* <script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
* <script>google.load("feeds", "1");</script> | |
* | |
* 実装例: | |
* $(function(){ | |
* $('rss').feed2node({ | |
* 'uri':'http://***.com/rss.xml', | |
* 'limit':'5', |
This file contains hidden or 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 | |
// composer require phpoffice/phpexcel | |
require "vendor/autoload.php"; | |
// Memory CacheだとFatal Errorが発生するため、"/tmp"にFile Cacheとして保存する | |
$cacheSettings = array("dir" => "/tmp"); | |
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp; | |
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings); | |
// Excelファイル読み込み |
This file contains hidden or 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
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"> | |
<head> | |
<title>PDF出力テスト</title> | |
<style> | |
.page { | |
page-break-after: always; | |
page-break-inside: avoid; | |
} | |
.page:last-child{ | |
page-break-after: auto; |
This file contains hidden or 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 elasticsearch | |
from requests_aws4auth import AWS4Auth | |
import json | |
if __name__ == '__main__': | |
# ESのエンドポイントを指定 | |
host='search-***************.ap-northeast-1.es.amazonaws.com' | |
awsauth = AWS4Auth( | |
# AWSユーザーのアクセスキーIDとシークレットアクセスキー |
This file contains hidden or 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 os | |
import re | |
import json | |
import email | |
import base64 | |
import urllib | |
import boto3 | |
from twilio.rest import Client |
This file contains hidden or 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
import os, json | |
from urlparse import parse_qs | |
from chalice import Chalice, Response | |
from twilio.jwt.client import ClientCapabilityToken | |
from twilio.twiml.voice_response import VoiceResponse | |
app = Chalice(app_name='EmployeeCaller') | |
# 音声通話のEndpoint、TwiMLを生成する | |
@app.route('/voice', methods=['POST'], content_types=['application/x-www-form-urlencoded'], cors=True) |
This file contains hidden or 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
from chalice import Chalice | |
from datetime import datetime | |
from retrying import retry | |
import boto3 | |
from botocore.exceptions import ClientError | |
app = Chalice(app_name='exponential-backoff') | |
def retryIfClientError(exception): | |
print(datetime.now().strftime("%Y/%m/%d %H:%M:%S")) |
This file contains hidden or 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
import sys | |
import re | |
import subprocess | |
import dateutil.parser | |
def attendanceDate(month): | |
output = {} | |
checkMonth = [0] | |
def assignDate(matchDate, func): | |
parseDate = dateutil.parser.parse(matchDate) |