$ 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
masayoshi@standard$ cat my.cnf | |
[client] | |
port = 3306 | |
socket = /var/run/mysqld/mysqld.sock | |
[mysqld_safe] | |
socket = /var/run/mysqld/mysqld.sock | |
nice = 0 | |
[mysqld] |
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__ | |
} |
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
# -*- 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
vi scp_batch_devloper | |
#!/bin/bash | |
SVC='user@hogehoge.net' | |
IS_FAILED='0' | |
HOME_DIR="/home/hogehoge/" | |
if [ $# -lt 1 ] ; then | |
echo "argument not found." |
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) |
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', |
OlderNewer