Skip to content

Instantly share code, notes, and snippets.

:shipit:
Delivery everyday

rch850 rch850

:shipit:
Delivery everyday
Block or report user

Report or block rch850

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rch850
rch850 / tig.md
Created Nov 26, 2019
よく使う tig のオプションなど
View tig.md

tig -S'hoge'

git log -p -S hoge 相当。捗る。

View montyhall.py
# Simulate Monty Hall Problem
# https://analytics-notty.tech/very-good-explain-montyhall-problem/
import random
def game(change):
doors = [1, 2, 3]
bingo = random.choice(doors)
hand = random.choice(doors)
@rch850
rch850 / connpass2sheet.gs
Last active Apr 20, 2019
Google Apps Script which copies connpass events to spreadsheet.
View connpass2sheet.gs
// Compiled using ts2gas 1.6.2 (TypeScript 3.4.4)
var exports = exports || {};
var module = module || { exports: exports };
//import { ConnpassEventsResponse } from "./connpass";
// Connpass API: https://connpass.com/about/api/
//
// 2400 is a series id of ふくもく会.
// Your series id can be revrieved by calling
// https://connpass.com/api/v1/event/?event_id=YOUR_EVENT_ID
var CONNPASS_SERIES_ID = 2400;
View slack-reactions.js
const process = require('process')
const https = require('https')
const slackToken = process.env.SLACK_TOKEN
if (!process.env.SLACK_TOKEN) {
console.error('Environment variable SLACK_TOKEN is empty!')
process.exit(1)
}
if (!process.argv[2]) {
console.error('usage: node slack-reactions.js MESSAGE_URL')
View curling.js
var express = require('express');
var router = express.Router();
const AA = `| |
| |
| |
| |
| |
| |
| |
@rch850
rch850 / WindowsVMSetup.md
Last active May 28, 2018
Windows VM Setup
View WindowsVMSetup.md

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

スペックの目安

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

オススメ初期化フロー

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

@rch850
rch850 / fresh-chrome.sh
Last active Sep 7, 2017 — forked from stuartsierra/fresh-chrome.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, and user config
View fresh-chrome.sh
#!/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
View open-ngrok-url.js
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 Mar 2, 2017
a patch for angular-cli to use pug
View angular-cli-pug.patch
# 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 Jan 6, 2017
Windows 10 VM セットアップ
View windows10vmsetup.md

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

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

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

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

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

You can’t perform that action at this time.