This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
#use warnings; | |
use Getopt::Std; | |
my $svn_info = `svn info|grep URL`; | |
die "not http repository: $svn_info" unless $svn_info =~ /^URL: https?.+$/sm; | |
die "trunk/branches directory not found in svn info: $svn_info" unless $svn_info =~ m#^URL: https?.+/(branches|tags|trunk)#sm; |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Getopt::Std; | |
my %opts; | |
Getopt::Std::getopts('b:t:', \%opts); |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
#use warnings; | |
use Getopt::Std; | |
my $svn_info = `svn info|grep URL`; | |
die "not http repository: $svn_info" unless $svn_info =~ /^URL: https?.+$/sm; | |
die "trunk/branches directory not found in svn info: $svn_info" unless $svn_info =~ m#^URL: https?.+/(branches|tags|trunk)#sm; |
This file contains hidden or 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
mysql> show create table m\G | |
*************************** 1. row *************************** | |
Table: m | |
Create Table: CREATE TABLE `m` ( | |
`id` int(11) NOT NULL, | |
`status` varchar(64) DEFAULT NULL, | |
`value` int(11) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1 | |
1 row in set (0.00 sec) |
This file contains hidden or 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
$ ps -ef -E |grep ssh-a[g]ent | perl -lne 'm/SSH_AUTH_SOCK=([^ ]+)/;print $1' | |
/tmp/launch-aaaaaa/Listeners |
This file contains hidden or 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
$ mysqldump -t -n --compact -hdbserver -uuser_id \ | |
db_name table_name -w 'row_id = 111' | |
-- | |
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES (ry | |
-- | |
INSERT INTO `table_name` VALUES (111,0,0,0); |
This file contains hidden or 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
# dbserver から new_serverへのコピー | |
$ mysqldump -t -n --compact -hdbserver -uuser_id \ | |
db_name table_name -w 'row_id = 111' \ | |
| mysql -hnew_server -uuser_id | |
This file contains hidden or 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
mysql -uroot dbname -S `ls -1t /var/folders/*/*/-TMP-/*/tmp/mysql.sock |head -1` |
This file contains hidden or 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
[vagrant@localhost setup]$ gem install chef --version 11.10 | |
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) | |
bad response Service Unavailable 503 (https://api.rubygems.org/api/v1/dependencies?gems=highline) | |
[vagrant@localhost setup]$ gem install chef --version 11.10 | |
^CERROR: Interrupted | |
[vagrant@localhost setup]$ gem install chef --version 11.10 | |
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) | |
bad response Service Unavailable 503 (https://api.rubygems.org/api/v1/dependencies?gems=puma) | |
[vagrant@localhost setup]$ gem install chef --version 11.10 |
This file contains hidden or 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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "base" | |
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box" | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder ".", "/var/www/html" |
OlderNewer