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
notas de integracion | |
opciones: | |
public_key | |
private_key | |
bluevia_auth_cookie_name: la cookie que vamos a utilizar para la autenticacion. | |
bluevia_cookies: nombres de las cookies. | |
bluevia_login_url: url de la pagina de login de bluevia | |
bluevia_register_url: url de la pagina de registro de bluevia | |
bluevia_edit_profile_url: url de la pagina de perfil de un usuario de bluevia |
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 do_backup(){ | |
FICHERO_BACKUP=$1 | |
# Do the backup | |
$MYSQL_PATH/mysqldump -p"$password" \ | |
--add-drop-table \ | |
-h "$hostname" \ | |
-u "$username" \ | |
"$database" \ |
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
// def writer = new FileWriter('markup.html') | |
def writer = new StringWriter() | |
def html = new groovy.xml.MarkupBuilder(writer) | |
html.html { | |
head { title 'Constructed by MarkupBuilder' } | |
body { | |
h1 'What can I do with MarkupBuilder?' | |
form (action:'whatever') { |
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 java.util.Date | |
import java.text.SimpleDateFormat | |
String myDate= '2011-01-20T13:51:24.63Z' | |
Date dtTmp = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss").parse( myDate); | |
println dtTmp.toString() |
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
// def writer = new FileWriter('markup.html') | |
def writer = new StringWriter() | |
def html = new groovy.xml.MarkupBuilder(writer) | |
html.html { | |
head { title 'Constructed by MarkupBuilder' } | |
body { | |
h1 'What can I do with MarkupBuilder?' | |
form (action:'whatever') { | |
for (line in ['Produce HTML','Produce XML','Have some fun']) |
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 org.apache.commons.lang.StringEscapeUtils | |
// Alternate way to import | |
this.class.classLoader.rootLoader.addURL(new File("/usr/local/java/grails-1.0/lib/commons-lang-2.1.jar").toURL()) | |
xml = ''' | |
<module id="id" version="0.0.1" package="package"> </module> | |
''' |
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 org.restlet.data.MediaType; | |
import org.restlet.resource.DomRepresentation; | |
import org.w3c.dom.Document | |
// Representation | |
DomRepresentation representation = new DomRepresentation( MediaType.TEXT_XML) | |
// Get the document root | |
Document doc= representation.getDocument() |
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
class MyClass{ | |
def myname | |
} | |
class TestCase{ | |
TestCase(){ } | |
def testNonEmptyTask(){ | |
def f = new MyClass() |
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
data= '[ "mykey": "myValue" ]' | |
map = Eval.me( data ) | |
// map= {myKey=myValue} |
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
wget --spider -r -l0 -np -k http://www.yoursite.com/ |