Skip to content

Instantly share code, notes, and snippets.

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

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

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

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

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

@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'
#
#!/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:
@pacojp
pacojp / bckconf
Created July 18, 2013 05:38
easy backup maker :)
#!/bin/sh
usage(){
echo "Usage: bckconf filename"
exit 1
}
# args error
[[ $# -eq 0 ]] && usage
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteLog "logs/rewrite_log"
#RewriteLogLevel 0
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/cgi-bin/qmailadmin(.*)?$ https://%{HTTP_HOST}/cgi-bin/qmailadmin [L,R]
</IfModule>
#!/bin/bash
#
# qmail
#
# chkconfig: 2345 80 30
# description: qmail start/stop script
# Source function library.
. /etc/rc.d/init.d/functions