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 TARGET_URL = 'https://example.com'; | |
const CARBON_API_URL = `https://api.websitecarbon.com/site?url=${TARGET_URL}`; | |
/** | |
* APIからデータを取得し、スプレッドシートに記録する | |
*/ | |
function main() { | |
const response = callApi(CARBON_API_URL); | |
if (response !== null) { | |
writeToSpreadsheet(response); |
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
/** | |
* This script calculates biorhythms based on a given birthday and adds them as events | |
* to a specified Google Calendar. Each event's title includes the biorhythm type and its value. | |
* It is designed to run on the 1st of every month and is idempotent, meaning it can run | |
* multiple times a month without causing duplicate entries. It deletes any existing biorhythm | |
* events for the month before adding new ones. | |
* | |
* Cycles: | |
* - Physical: 23 days | |
* - Emotional: 28 days |
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
/** | |
* Refer to https://tech.affordigitalife.com/oura-api-sleep-log/ | |
*/ | |
function main() { | |
const days = 10; | |
for (let i = 0; i < days; i++) { | |
let today = new Date() | |
today.setDate(today.getDate() - i) | |
let yesterday = new Date() | |
yesterday.setDate(yesterday.getDate() - (i + 1)) |
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
image: python:2 | |
stages: | |
- deploy | |
before_script: | |
- curl -s https://shopify.github.io/themekit/scripts/install.py | python | |
deploy_staging: | |
stage: deploy |
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 | |
namespace App\Shell\Task; | |
use Bake\Shell\Task\ModelTask; | |
use Cake\Console\Shell; | |
use Cake\Core\Configure; | |
use Cake\ORM\TableRegistry; | |
/** | |
* Class GenerationGapModelTask |
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 | |
namespace App\Command; | |
use Cake\Console\Arguments; | |
use Cake\Console\Command; | |
use Cake\Console\ConsoleIo; | |
use Cake\Console\ConsoleOptionParser; | |
use Cake\Datasource\ConnectionManager; | |
/** |
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
/** | |
* Map表示を行う | |
* @class Map | |
*/ | |
;var Map = (function(window, $) { | |
/** | |
* コンストラクタ | |
* @class Map | |
*/ |
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 | |
/** | |
* GoogleMapAPIコンポーネント | |
*/ | |
class GoogleMapAPIComponent extends Component { | |
/** | |
* APIベースURL | |
* @var string | |
*/ |
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 | |
/** | |
* jquery.lazyloadの制御を行うHelper | |
*/ | |
class LazyLoadHelper extends AppHelper { | |
/** | |
* 使用するヘルパーの宣言 | |
* @var array | |
*/ |
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 | |
/** | |
* QRコード出力 | |
*/ | |
class QRHelper extends AppHelper { | |
/** | |
* QRコードを扱うAPIのURL | |
* @var string | |
*/ |
NewerOlder