Skip to content

Instantly share code, notes, and snippets.

@pacojp
pacojp / vmware_setup.md
Created August 21, 2017 07:29
vmware クライアントOSとsshで接続しつつ気軽にクライアントOSからインターネットへ接続する

クライアントOSとsshにて通信したいが、ネットがない状態での接続ができないのは許容できないので。

とりあえずネットワークアダプタを2つ用意することで対応できたので備忘。

初期のネットワークをprivate networkとして、追加ネットワークアダプタを Internet Sharingとして設定

private networkとして設定したネットワークアダプタ

@pacojp
pacojp / install.sh
Last active August 22, 2017 13:37
my OS X installation
# ソフトウェアアップデートを実行
#
# ライセンスが karamunode app storeから入れるmono
#
# * witch
# * 1password
#
# # witch
#
# command-tabに設定するにはまずはtabを設定してみてからその後command-tabに設定するとうまく行った、、、、
@pacojp
pacojp / screenshoting.rb
Last active December 7, 2016 01:15
most(?) simple way to take screenshot with ruby
#
# # install phantomjs
#
# * https://bitbucket.org/ariya/phantomjs/downloads # simply use binary!
# * brew install phantomjs
#
# # Gemfile
#
# source 'https://rubygems.org'
#
@pacojp
pacojp / gist:a5ec8a182592d7234587
Created July 19, 2015 11:37
run only edited test method by watchr
require 'diff/lcs'
require 'diff/lcs/string'
require 'digest/md5'
require 'fileutils'
require 'shellwords'
@project_name = "hogehoge"
watch( 'test/test_.*\.rb' ) {|md| system("rake test") }
@pacojp
pacojp / gist:0ec37d85bc32d6d3eec1
Created December 17, 2014 15:21
miintest5でterminal-notifierを使うサンプル
# https://github.com/alloy/terminal-notifier
#
# via.
# https://github.com/kern/minitest-reporters/blob/master/lib/minitest/reporters/base_reporter.rb
module Minitest
module Reporters
class NotificationReporter < Minitest::StatisticsReporter
attr_accessor :tests
require 'openssl'
require 'base64'
# 以下は自分で作ったテスト用鍵(password:test)
key = "-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5FXW2ILwLtuzTZyftaBX
47C5kvQk0q+qBB8iuTOoJawrgE5lzspDYJSwA8fPtbzAdxooNUTMdyv6SVWj1vH2
SWP3M0KH9LzyQJlxoS03GoRpw8XHNWZr5+JClcBEuUiAp09B9pLR3i+kX4vzc1+z
1LRLCwBLq8BiL+lSf1mDNrMKi8pSzsYHk1TTPeQuRjCRip6rQFvr1Gllj+ZrCir4
q3z77/7xbE23JdbqB9wmXUhKHcIlO5nwVnczkdz0d6OL4vU7F9feRoMGDXCKq7ZZ
#!/bin/sh
# Example script for removing a Maildir domain top-level folder
# from a Courier-IMAP virtual mail hierarchy.
# The script only looks at argument 1, assuming that it
# indicates the relative name of a domain, such as
# "somedomain.com". If $basedir/somedomain.com exists, it will
# be removed.
#!/bin/sh
# Example script for removing a Maildir from a Courier-IMAP virtual mail
# hierarchy.
# The script looks at arguments 1 and 2, assuming that they
# indicate username and domain, respectively.
# The script will not actually delete the maildir. I moves it
# to a special directory which may once in a while be cleaned up
#!/bin/sh
# Example script for adding a Maildir to a Courier-IMAP virtual mail
# hierarchy.
# The script only looks at argument 3, assuming that it
# indicates the relative name of a maildir, such as
# "somedomain.com/peter/".
# This script should be run as the user which owns the maildirs. If
use strict;
# a minimalistic configuration file for amavisd-new with all necessary settings
#
# see amavisd.conf-default for a list of all variables with their defaults;
# for more details see documentation in INSTALL, README_FILES/*
# and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
# COMMONLY ADJUSTED SETTINGS: