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 json | |
from flask import jsonify | |
import requests | |
APPLE_DEVICE_LIST_URL = "https://raw.githubusercontent.com/pbakondy/ios-device-list/master/devices.json" | |
apple_device_list = [] | |
def apple_devices(request): | |
"""Return apple device info. |
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/bash | |
remove_log_streams() { | |
LOG_GROUP_NAME=("$1") | |
LOG_STREAMS=("$2") | |
PROFILE=("$3") | |
for LOG_STREAM in ${LOG_STREAMS[@]}; do | |
LOG_STREAM=${LOG_STREAM//\"/} # remove double quotes which are added by jq | |
echo "Delete $LOG_GROUP_NAME: $LOG_STREAM" | |
aws logs \ |
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 MK = "{[「『(⦅〈《〔〘【〖"; | |
var AK = "}]」』)⦆〉》〕〙】〗"; | |
var KT = "、,。."; | |
var regexpMK = new RegExp("(.{1})([" + MK + "])", "g"); | |
var regexpAK = new RegExp("([" + AK + "])(.{1})", "g"); | |
var regexpKT = new RegExp("[" + KT + "]", "g"); | |
document.addEventListener("DOMContentLoaded", function () { | |
var body = document.getElementsByTagName("body")[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
.loom { | |
font-size: 100%; | |
line-height: 1.8; | |
} | |
#wikicard { | |
padding: 0; | |
border: none; | |
background-color: transparent; | |
margin-top: -30px; |
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
body { | |
text-rendering: optimizeLegibility; | |
-webkit-font-smoothing: antialiased; | |
} | |
a { | |
color: #4078c0; | |
} | |
a:hover, a:focus { |
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
'use strict'; | |
// 全体の設定 | |
var DST_BUCKET = 'xxxxxxxxxxx'; // WebP が格納されるバケット | |
var SRC_BUCKET = 'xxxxxxxxxxx'; // イベントソース | |
var ACCESS_KEY = 'XXXXXXXXXXXXXXXXXXXX'; // アクセスキーID | |
var SECRET_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; // シークレットキー | |
var REGION = 'ap-northeast-1'; // リージョン | |
var ACCEPTED_EXTENTIONS = ["png", "jpg", "gif"]; // 拡張子 |
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/bash | |
function cmp_ssim() { | |
echo $1 | |
pyssim $1 $2 | |
} | |
cmp_ssim $1 $2 |
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
#!/usr/local/bin/bash | |
for i in {10..60..5} | |
do | |
echo "---------------------------------------------" | |
echo "[start] rate: $i %" | |
echo "---------------------------------------------" | |
find . -name "*.png" -print0 | xargs -0 -I{} cwebp -q $i {} -o {}-$i.webp | |
echo "---------------------------------------------" | |
echo "[finish] rate: $i % " |
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
/** | |
* iOS 10〜 | |
* San Francisco, ヒラギノの組み合わせ | |
*/ | |
@charset "utf-8"; | |
textarea { | |
font-family: monospace; | |
} |
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
function zipit() { | |
string_dirpath=$(cd `dirname $1` > /dev/null && pwd) | |
string_filepath=${string_dirpath}/`basename $1` | |
echo "Attempt to zip \"${string_filepath}\"" | |
if [ -e $string_filepath ] ; then | |
echo "It exists!" | |
string_filename=`basename $1` | |
date=`date +"%Y%m%d%H%M%S"` |
NewerOlder