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
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 にする

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

@rch850
rch850 / ffmpeg-i-have-used.md
Last active February 13, 2024 09:36
ffmpeg command history
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 に切り出し
    • 画面右下の「レイヤー」で、必要なレイヤーだけを表示状態にする
  • 範囲選択する
@rch850
rch850 / git-alias
Last active September 3, 2015 01:28
git config --global alias.g 'log --graph --branches --pretty=format:"%d [%h] \"%s\""'
git config --global alias.co checkout
git config --global alias.st status
@rch850
rch850 / LoggerLister.java
Created March 18, 2015 05:42
LoggerLister
import java.util.Iterator;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.classic.spi.ILoggingEvent;
import ch.qos.logback.core.Appender;
public class LoggerLister {
git clone https://github.com/keiko713/rails-todo.git
cd rails-todo
bundle install --without production
foreman run bundle exec rake db:migrate
foreman start
@rch850
rch850 / CCSInjectionVulnerabilitySummary.md
Last active August 29, 2015 14:02
CCS Injection Vulnerability ざっくり

ブラウザからの閲覧についての影響は小さい

クライアント、サーバの両方が OpenSSL を使っていて、かつ脆弱なバージョンのときだけ攻撃できる。 メジャーなブラウザは OpenSSL を使っていないらしい(参考:ssl - which browser is using openssl - Stack Overflow)。 よって、ブラウザからの閲覧についての影響は小さい。

ではどういう時が対象なのか?

例えば、ウェブサイトが何らかの Web API を使っていて、ウェブサイトのサーバと API が脆弱な OpenSSL を使っている場合は対象となる。