Skip to content

Instantly share code, notes, and snippets.

View studiomaestro's full-sized avatar

Masakazu Ishibashi studiomaestro

View GitHub Profile
> !
History commands:
!! Execute the last command again
!: Show all previous commands
!:n Show the last n commands
!n Execute the command with index n, as shown by the !: command
!-n Execute the nth command before this one
!string Execute the most recent command starting with 'string'
!?string Execute the most recent command containing 'string'
>
@Grab(group='org.ccil.cowan.tagsoup', module='tagsoup', version='0.9.7')
def getHtml(String query) {
def parser = new XmlParser(new org.ccil.cowan.tagsoup.Parser())
parser.parse("http://mvnrepository.com/search.html?query="+query)
}
if(this.args.size() > 0){
getHtml(args[0]).body.'**'.p.grep{it.@class=="result"}.each{
println "${it.a[2].text()} ${it.a[1].text()}"
}
}else{
[CFSPIKE ~]$ vmc
Usage: vmc [options] command [<args>] [command_options]
Try 'vmc help [command]' or 'vmc help options' for more information.
[CFSPIKE ~]$ vmc help
Usage: vmc [options] command [<args>] [command_options]
Try 'vmc help [command]' or 'vmc help options' for more information.
Currently available vmc commands are:
Getting Started
target [url] Reports current target or sets a new target
login [email] [--email, --passwd] Login
[CFSPIKE ~]$ vmc target api.cloudfoundry.com
Succesfully targeted to [http://api.cloudfoundry.com]
[CFSPIKE ~]$ vmc login
Email: EMAIL
Password: **************
Successfully logged into [http://api.cloudfoundry.com]
[CFSPIKE ~]$ vmc runtimes
+--------+-------------+-----------+
| Name | Description | Version |
+--------+-------------+-----------+
| node | Node.js | 0.4.5 |
| java | Java 6 | 1.6 |
| ruby18 | Ruby 1.8 | 1.8.7 |
| ruby19 | Ruby 1.9 | 1.9.2p180 |
+--------+-------------+-----------+
[CFSPIKE ~]$ vmc frameworks
+---------+
| Name |
+---------+
| node |
| grails |
| spring |
| rails3 |
| sinatra |
[CFSPIKE ~]$ vmc services
============== System Services ==============
+---------+---------+-------------------------------+
| Service | Version | Description |
+---------+---------+-------------------------------+
| mysql | 5.1 | MySQL database service |
| redis | 2.2 | Redis key-value store service |
| mongodb | 1.8 | MongoDB NoSQL store |
[CFSPIKE ~]$ vmc create-service mongodb mongotest
Creating Service: OK
[CFSPIKE ~]$ vmc services
============== System Services ==============
+---------+---------+-------------------------------+
| Service | Version | Description |
+---------+---------+-------------------------------+