Skip to content

Instantly share code, notes, and snippets.

@etexier
etexier / gist:7476355
Last active December 28, 2015 09:09
test
// This is a sample recipe
println "\nTHIS IS SAMPLE SCRIPT:"
println "\nLET'S CREATE A SAMPLE HELLOWORLD PROJECT FROM A ZIP LOCATED ON DROPBOX...\n"
println "\nCalling 'project-create -o temp -DartifactId=helloworldproject -qf -p https://dl.dropboxusercontent.com/u/23850645/helloworld.zip'\n"
project-create -o temp -DartifactId=helloworldproject -qf -p https://dl.dropboxusercontent.com/u/23850645/helloworld.zip
println ("\nDone creating project temp. Go to " + new File("temp").absolutePath + "\n")
println ("\nNOW LET'S BUILD IT using 'pb -DskipTests=true -T 1.5C'...")
Thread.sleep(4000)
pb -DskipTests=true -T 1.5C
println ("\nCOMPILATION DONE. LET'S RE-INITIALIZE THE DB with 'db-drop' and 'db-initialize'...\n")
@etexier
etexier / gist:7476717
Created November 15, 2013 00:04
sample helloworld project for mab
project.groupId='com.magnet'
project.artifactId='helloworld-project'
project.version='1.0.0'
project._package='com.magnet.connect.helloworld'
project.type='logic'
project.platform_version='2.1.0'
project.package='com.magnet.helloworldproject'
include(HelloWorldControllerDefaults)
@etexier
etexier / gist:7477994
Last active December 28, 2015 09:19
A sample command
/*
* Copyright (c) 2013 Magnet Systems, Inc. All rights reserved.
*/
package com.magnet.tools.cli.test
import com.magnet.tools.cli.AbstractCommand
import com.magnet.tools.cli.Constants
/**
@etexier
etexier / 2entityControllers.mapp
Created December 12, 2013 19:48
a simple myapp project with 2 entity controllers.
/* Generated by Magnet Plugin v1.1.3-SNAPSHOT on 2013-12-12 11:49:27.593 */
project.port='8080'
project.host='localhost'
project.protocol='http'
project.transactional='true'
project.jdbcHost='localhost'
project.jdbcPort='3306'
project.jdbcSystemEnabled='true'
project.jdbcAppEnabled='true'
command.summary=Register or unregister custom App Builder commands
command.options=[-v] [-u <commandName>] [[-i] <sourceFile>]
command.description=\n \
You can write your own custom commands to use with the App Builder. \n \
Once you have created the source file with the custom commands, \n \
register the file with the App Builder by specifying the path or URL \n \
for the file.\n \
\n \
You also use the register command to unregister a previously registered \n \
command by passing the -u option and the command.\n \
/*
* Copyright (c) 2013 Magnet Systems, Inc. All rights reserved.
*/
package patch
import com.magnet.tools.cli.AbstractCommand
/**
*/
@etexier
etexier / gist:8305870
Created January 7, 2014 19:59
default helloworld project
project-create -n sample -vq -Dplatform_version=2.2.0-SNAPSHOT
api-add -qv simple
// comment out the following is not necessary
project-build -DskipTests=true
db-initialize -qv
server-start
server-log
server-stop
@etexier
etexier / gist:8465915
Created January 16, 2014 23:58
Rest by example text file
# This is a sample request:
# Request
http://maps.googleapis.com/maps/api/distancematrix/json?origins=435+Tasso+Street+Palo+Alto+CA&destinations=Embarcadero+Street+San+Francisco+CA&sensor=false&mode=driving&language=en&units=imperial
# This is the expected response:
# Response
{
"destination_addresses" : [ "Embarcadero, 298 Market Street, San Francisco, CA 94111, USA" ],
@etexier
etexier / gist:9257724
Created February 27, 2014 19:40
rest-by-example for google geocode api
#Request
http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true
#Response
{
"results" : [
{
"address_components" : [
{
@etexier
etexier / traderservice.wsdl
Created June 2, 2014 23:35
Trader service sample RPC-ENCODED WSDL
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:tns="http://www.bea.com/examples/Trader"
xmlns:wsr="http://www.openuri.org/2002/10/soap/reliability/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap12enc="http://www.w3.org/2003/05/soap-encoding"
xmlns:conv="http://www.openuri.org/2002/04/wsdl/conversation/"