With options -e
, -n
, -p
, perl can do what grep/awk/sed can, what about ruby?
Let's take the result of ls -l
as input and process it with ruby
\ls -l | ruby -ne 'print if /^d/'
\ls -l | ruby -ne 'puts split(/\s+/).last if /^d/'
#!/bin/bash | |
OPENSSL_VERSION="1.0.1g" | |
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_i386 | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
cd openssl_i386 |
Install ImageMagick for image conversion:
brew install imagemagick
Install tesseract for OCR:
brew install tesseract --all-languages
Or install without --all-languages
and install them manually as needed.
#!/bin/sh | |
SERVER="http://localhost:8081" | |
URL="$SERVER/nexus/service/local/artifact/maven/content" | |
REPO="sandbox" | |
USER="admin:admin123" | |
group=$1 | |
artifact=$2 |
$ brew install tesseract --all-languages | |
Warning: Experimental support for using the "Command Line Tools" without Xcode. | |
Some formulae need Xcode to be installed (for the Frameworks not in the CLT.) | |
==> Downloading http://tesseract-ocr.googlecode.com/files/tesseract-3.01.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/tesseract-3.01.tar.gz | |
==> /bin/sh autogen.sh | |
==> ./configure --prefix=/usr/local/Cellar/tesseract/3.01 | |
==> make install | |
==> Downloading http://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.01.heb.tar.gz | |
######################################################################## 100,0% |
Choose archetype: | |
1: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-jsf-jpa (Archetype for web applications (JSF + JPA) using Demoiselle Framework) | |
2: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-minimal (Basic archetype for generic applications using Demoiselle Framework) | |
3: remote -> co.ntier:spring-mvc-archetype (An extremely simple Spring MVC archetype, configured with NO XML.) | |
4: remote -> com.agilejava.docbkx:docbkx-quickstart-archetype (-) | |
5: remote -> com.alibaba.citrus.sample:archetype-webx-quickstart (-) | |
6: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin.embed-simple-archetype (-) | |
7: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin7.embed-simple-archetype (-) | |
8: remote -> com.cedarsoft.open.archetype:multi (-) | |
9: remote -> com.cedarsoft.open.archetype:simple (-) |
function createCORSRequest(method, url) { | |
var xhr = new XMLHttpRequest(); | |
if ("withCredentials" in xhr) { | |
// Check if the XMLHttpRequest object has a "withCredentials" property. | |
// "withCredentials" only exists on XMLHTTPRequest2 objects. | |
xhr.open(method, url, true); | |
} else if (typeof XDomainRequest != "undefined") { |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one | |
or more contributor license agreements. See the NOTICE file | |
distributed with this work for additional information | |
regarding copyright ownership. The ASF licenses this file | |
to you under the Apache License, Version 2.0 (the | |
"License"); you may not use this file except in compliance | |
with the License. You may obtain a copy of the License at |
Get EC2 CloudWatch stats and graph them in Dashing.