Skip to content

Instantly share code, notes, and snippets.

View rch850's full-sized avatar
:shipit:
Delivery every week

rch850 rch850

:shipit:
Delivery every week
View GitHub Profile
@rch850
rch850 / WindowsVMSetup.md
Last active May 28, 2018 08:14
Windows VM Setup

Edge や IE での動作確認のため Microsoft からダウンロードした VirtualBox の VM をいい感じにセットアップするためのメモ。

スペックの目安

  • メインメモリー 4096MB
  • ビデオメモリ 128MB

オススメ初期化フロー

時間がかかる部分について

@rch850
rch850 / curling.js
Created February 25, 2018 05:03
curling
var express = require('express');
var router = express.Router();
const AA = `| |
| |
| |
| |
| |
| |
| |
@rch850
rch850 / fresh-chrome.sh
Last active September 7, 2017 08:46 — forked from stuartsierra/fresh-chrome.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, and user config
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every
const http = require('http')
const spawn = require('child_process').spawn
http.get('http://localhost:4040/api/tunnels', res => {
let rawData = ''
res.on('data', chunk => { rawData += chunk; })
res.on('end', () => {
JSON.parse(rawData).tunnels
.filter(t => t.proto === 'https')
.forEach(t => { spawn('open', [t.public_url]) })
@rch850
rch850 / angular-cli-pug.patch
Last active March 2, 2017 04:30
a patch for angular-cli to use pug
# patch angular-cli@1.0.0-rc.0 to use pug.
# see "Revisions" for older angular-cli.
# usage: patch -p0 < angular-cli-pug.patch
# npm install --save-dev apply-loader pug-loader
# source: https://github.com/angular/angular-cli/issues/1886#issuecomment-280923201
--- node_modules/@angular/cli/models/webpack-configs/common.js.orig 2017-02-25 16:30:09.000000000 +0900
+++ node_modules/@angular/cli/models/webpack-configs/common.js 2017-03-02 13:21:10.000000000 +0900
@@ -72,6 +72,7 @@ function getCommonConfig(wco) {
{ enforce: 'pre', test: /\.js$/, loader: 'source-map-loader', exclude: [nodeModules] },
@rch850
rch850 / windows10vmsetup.md
Created January 6, 2017 10:17
Windows 10 VM セットアップ

カメラを使えるようにする:

  • VirtualBox の設定で、ポート>USB>USBコントローラーを有効化>USB 3.0

フルスクリーンモードにするため:

  • VirtualBox の設定で、VRAM を 32 MB にする

日本語フォントを追加する:

FROM ubuntu:xenial
RUN apt-get -y update
RUN apt-get -y install curl clang libicu-dev python-dev
RUN apt-get -y install libxml2
RUN curl https://swift.org/builds/swift-3.0-preview-1/ubuntu1510/swift-3.0-preview-1/swift-3.0-preview-1-ubuntu15.10.tar.gz > /tmp/swift.tar.gz
RUN cd /opt && tar xzvf /tmp/swift.tar.gz
RUN apt-get -y install vim git

Kritaでやりたいこと、できたことのメモ。 ブログとかに書くための下書き。

  • レイヤーの表示、非表示をショートカットで切り替えたい
  • レイヤーのツリーを全部閉じたい
  • 範囲選択してコピーしても、ひとつのレイヤーしかコピーされない
    • Ctrl + C だと単一レイヤーのコピー。Ctrl + Shift + C で「統合部分をコピー」になる
  • 一部のレイヤーだけ抽出して、最小範囲で png に切り出し
    • 画面右下の「レイヤー」で、必要なレイヤーだけを表示状態にする
  • 範囲選択する

AWS で動いている nginx のログを fluentd で S3 に転送している状態で、 ログを Elastic Search に飛ばして Kibana 3 で眺めるまでの流れ。

セキュリティグループを作る

  • 拠点からの80番と9200番を許可(443にできるなら443で)
  • ログを発生させるサーバからの9200番を許可

適当なEC2インスタンスを立てる

カレンダー共有

  • カレンダーの▼から[カレンダーの設定]を選ぶ
  • 上の方の[このカレンダーを共有]を押す
  • [このカレンダーを他のユーザーと共有する]にチェックを入れる
  • [このカレンダーを組織……]にチェックを入れ、[閲覧権限]を選ぶ
  • [保存]する
  • 再度カレンダーの設定を開き、下の方にある[カレンダーID]に書いてあるメールアドレスを相手に教える
  • 相手は、カレンダートップ右側の[他のカレンダー]の下にある入力欄に、教えてもらったメールアドレスを貼り付けてエンターを押す