Skip to content

Instantly share code, notes, and snippets.

View tanakeiQ's full-sized avatar

tanakeiQ tanakeiQ

View GitHub Profile
@tanakeiQ
tanakeiQ / warning-console.js
Created June 18, 2018 06:04
console.logでの警告のベスト・プラクティス
console.info(`%c このページでの使用しないでください。\n第三者のコマンドを実行すると、悪意のあるプログラムが実行される可能性があります`, 'font-size:32px; font-weight: bold;');
@tanakeiQ
tanakeiQ / circle-gauge-animation.swift
Last active May 6, 2018 06:54
Circle Gauge Animation Playground
// Refs: https://qiita.com/uin010bm/items/ff934d070d43a4666dbc
// Author: https://qiita.com/uin010bm
//Confirmed on Xcode 9.3(Swift 4.3)
//Change extenstion `swift` to `playground`.
import UIKit
import PlaygroundSupport
// CAShapeLayerインスタンスを生成
var circle: CAShapeLayer = CAShapeLayer()
@tanakeiQ
tanakeiQ / swift4-logger-service.swift
Created February 3, 2018 17:10
swift4-logger-service.swift
public class Logger {
fileprivate enum Prefix: String {
case Info = "🍀"
case Warn = "🍋"
case Error = "🍎"
case Happy = "🎀"
}
public static func info(_ items: String...) {
print(serialize(items, prefix: .Info))
@tanakeiQ
tanakeiQ / modal-example.html
Last active January 16, 2018 18:06
Modal script in native javascript
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>
Modal test
</title>
</meta>
<link rel="stylesheet" href="modal.css">
</head>
@tanakeiQ
tanakeiQ / docker-es-clustering.md
Created April 18, 2017 03:49
dockerでらくちんelasticsearch clustering

1.elasticsearch.yml作成

network.host: 0.0.0.0
 
cluster.name: TANAKEIQ_ES

node.name: ${NODE_NAME}

# ESのバージョンが5.3以下の場合multicastが機能するため、無効化する
discovery.zen.ping.multicast.enabled: false