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
addEventListener("fetch", (event) => { | |
const url = 'https://unitrad.calil.jp/v1/search?free=%E9%AC%BC%E6%BB%85%E3%81%AE%E5%88%83®ion=openbd-future' | |
fetch(url).then(r => r.json()).then(data => { | |
const response = new Response(JSON.stringify(data), { | |
headers: { "content-type": "application/json; charset=utf-8" }, | |
}); | |
event.respondWith(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
const detectBrowser = () => { | |
const userAgent = window.navigator.userAgent.toLowerCase(); | |
if(userAgent.indexOf('msie') != -1 || | |
userAgent.indexOf('trident') != -1) { | |
return 'ie' | |
} else if(userAgent.indexOf('edge') != -1) { | |
return 'edge' | |
} else if(userAgent.indexOf('chrome') != -1) { | |
return 'chrome' | |
} else if(userAgent.indexOf('safari') != -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
import json | |
import datetime | |
import shutil | |
f = open('./instagram_ source_data/media.json', 'r') | |
data = json.load(f) | |
photos = data['photos'] | |
for photo in photos: | |
taken_at = photo['taken_at'] | |
tdatetime = datetime.datetime.strptime(taken_at, '%Y-%m-%dT%H:%M:%S%z') |
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
/* | |
Unitrad UI APIライブラリ | |
Copyright (c) 2017 CALIL Inc. | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
*/ |
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
var fs = require('fs') | |
var sass = './src/sass/index.sass'; | |
fs.readFile(sass, 'utf8', function (err,data) { | |
if (err) { | |
return console.log(err); | |
} | |
// console.log(data) | |
var result = data.replace(/([\d+\.]+)rem/g, function(match) { | |
console.log(match) | |
var m = match.match(/[\d+\.]+/); |
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 fs = require('fs'); | |
const path = require('path'); | |
const glob = require('glob'); | |
const sass = require('node-sass'); | |
const commandLineArgs = require('command-line-args'); | |
// コマンドラインオプションの定義 | |
const optionDefinitions = [ | |
{ | |
name: 'file', |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
html, body { | |
width: 100%; |