- Alfred
- ショートカットのランチャー。何かと便利
- Clipy
- コピーをしてる内容を保持しておいて、選択してペーストできるツール
- CotEditor
- シンプルなエディタ。メモとかに使うのにすごく便利だし、正規表現とか覚えるといろいろ捗るのでオススメ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.parse | |
import urllib.request | |
import json | |
from xml.sax.saxutils import unescape # エスケープされた記号を戻す | |
url = "https://slack.com/api/im.history?" # https://api.slack.com/methods/im.history | |
def create_params(ts = None): | |
params = {'token': 'xxxxx', | |
'channel': 'xxxxx', |
$ rbenv local 2.5.1
$ ruby -v
ruby 2.5.1
$ gem install bundler
$ mkdir my_project
$ cd my_project
$ bundle init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/https' | |
require 'uri' | |
time = Time.now - 24*60*60 * 180 | |
url = "http://b.hatena.ne.jp/okbm/atomfeed?date=#{time.strftime('%Y%m%d')}" | |
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' | |
uri = URI.parse(url) | |
http = Net::HTTP.new(uri.host, uri.port) |
$ mysql
mysql > SHOW VARIABLES LIKE 'max_allowed_packet';
# cnfの場所
$ mysql --help | grep my.cnf
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "vagrant-python-dev" | |
config.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_debian-7.1.0_provisionerless.box" | |
config.vm.network :forwarded_port, guest: 80, host: 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function print_help () { | |
cat <<__EOF__ | |
Usage: sh $0 | |
簡易デプロイシェル | |
1) git fetch -p && git checkout master && git pull | |
2) DocumentRoot以下にrsyncするだけ | |
Options | |
-h, --help show this message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function print_help () { | |
cat <<__EOF__ | |
Usage: $0 <opt> <path> | |
Options | |
-n dryrun | |
-h, --help show this message | |
__EOF__ | |
} |