Skip to content

Instantly share code, notes, and snippets.

@bills-appworks
bills-appworks / bundle-css.ps1
Created July 7, 2019 12:06
"React: Up and Running" Boilerplate CSS files bundle command for PowerShell / "Reactビギナーズガイド" ボイラープレートCSSファイル結合コマンド for PowerShell
# "React: Up and Running" Boilerplate CSS files bundle command for PowerShell
# http://shop.oreilly.com/product/0636920042266.do
# "Reactビギナーズガイド" ボイラープレートCSSファイル結合コマンド for PowerShell
# https://www.oreilly.co.jp/books/9784873117881/
#
# Original command:
# cat css/*/* css/*.css | sed `s/..\/..\/images/images/g' > bundle.css
Get-Content -Path css/*/*,css/*.css | ForEach-Object { $_ -replace "../../images","images" } > bundle.css
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script src="https://cdn.rawgit.com/zloirock/core-js/master/client/shim.min.js"></script>
@bills-appworks
bills-appworks / sample-01.js
Created July 16, 2019 14:49
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / sample-02.js
Created July 17, 2019 15:16
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / Promise-01.js
Created July 18, 2019 14:51
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / Promise-02.js
Created July 22, 2019 15:04
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / Promise-01.pu
Last active July 22, 2019 15:31
Promise/async/await PlantUML
@startuml
title Promise-01.js
activate "<top>"
"<top>" -> "main()"
activate "main()"
group main()
"main()" -> "subroutine()"
activate "subroutine()"
@bills-appworks
bills-appworks / async-await-01.js
Created July 25, 2019 11:48
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / async-await-02.js
Created July 25, 2019 12:41
Promise/async/await for calling asynchronous API like synchronous
'use strict';
const start_time = Date.now();
function timestamp_log(message) {
const duration = Date.now() - start_time;
console.log(`[${duration}]: ${message}`);
}
timestamp_log('script start');
@bills-appworks
bills-appworks / 2021-shizen.gv
Created December 9, 2020 10:50
放送大学 教養学部 自然と環境コース 2021年度 履修順参考
/**
* @fileoverview 放送大学 教養学部 自然と環境コース 2021年度 履修順参考
* @author twitter:@billstw
*
* 放送大学 授業科目案内 教養学部 2021年度
* https://www.ouj.ac.jp/hp/kamoku/2021/kyouyou/C/index.html
*
* 放送大学 2021年度 第1学期 学部授業科目案内
* https://www.ouj.ac.jp/booklet/assets/pdf/2021/08_2021-1_gakubu_kamoku.pdf
*/