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
<?php | |
/** | |
* @copyright This is free software released into the public domain. | |
* @license GNU General Public License version 2 or later; see http://www.gnu.org/licenses/gpl-2.0.html | |
* | |
* Created based on the information found on: | |
* | |
* http://stackoverflow.com/questions/14285536/invalid-token-with-joomla-custom-component/14433783#14433783 | |
* http://docs.joomla.org/How_to_add_CSRF_anti-spoofing_to_forms | |
* |
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
<?php | |
/** | |
* Basic connection to SAP HANA from PHP | |
* | |
* This is a sample connection to a SAP HANA system. It includes a proper error messaging so if the connection will fail | |
* you should be able to get a proper error message. | |
* | |
* @license The MIT License (MIT) | |
* @author Valentin Despa <info[at]vdespa[dot]de> | |
* @version 1.0 / 04.12.2013 |
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
<?php | |
$username = "your_name"; | |
$password = "your_password"; | |
$hostname = "localhost"; | |
//connection to the database | |
$dbhandle = mysql_connect($hostname, $username, $password) | |
or die("Unable to connect to MySQL. \n" . mysql_errno($link) . ": " . mysql_error($link). "\n"); | |
echo "Connected to MySQL<br>"; |
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
const newman = require('newman'); | |
newman.run({ | |
collection: require('./postman_collection.json'), | |
reporters: 'cli' | |
}).on('start', function (error, args) { // on start of run, log to console | |
console.log('Running a collection...'); | |
}).on('request', function (error, execution) { | |
if (error) { | |
console.error('collection run encountered an error.'); |
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
const newman = require('newman'); | |
newman.run({ | |
collection: require('./postman_collection.json'), | |
reporters: 'cli' | |
}).on('beforeRequest', function (error, args) { | |
if (error) { | |
console.error(error); | |
} else { | |
// Log the request body |
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
const newman = require('newman'), | |
fs = require('fs'); | |
newman.run({ | |
collection: require('./postman_collection.json'), | |
reporters: 'cli' | |
}).on('beforeRequest', function (error, args) { | |
if (error) { | |
console.error(error); | |
} else { |
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
const fs = require('fs'); | |
const fileName = Math.random().toString(36).substring(7) + '-foo.txt'; | |
fs.writeFile(fileName, 'bar', function (error) { | |
if (error) { | |
console.error(error); | |
} | |
}); |
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
const fs = require('fs'); | |
fs.writeFile(`foo.txt`, 'bar', function (error) { | |
if (error) { | |
console.error(error); | |
} | |
}); |
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
const newman = require('newman'); | |
newman.run({ | |
collection: require(‘./postman_collection.json’), | |
reporters: 'cli' | |
}, function (err) { | |
if (err) { throw err; } | |
console.log('Collection run complete!'); | |
}); |
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
newman run "https://www.getpostman.com/collections/f36406f34fcc7d4e0502" |
OlderNewer