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
var es = require('event-stream'); | |
var logger = es.mapSync(function (data) { //create a stream that logs to stderr, | |
console.error(data); | |
return data; | |
}); |
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
.exec(http("Goto Your Desired URL") | |
.get("http://THIS_SHOULD_BE_YOUR_URL") | |
.check( | |
status.is(200), | |
bodyString.saveAs("responseBody") | |
) | |
) | |
.exec( | |
session => { | |
// You can do whatever you want with the string |
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
.exec(http("PERFORM A FILE UPLOAD") | |
.post("YOUR_DESIRED_URL_FOR_UPLOAD") | |
.body(ELFileBody("THE_FILE_TO_UPLOAD")) | |
.check( | |
status.is(200), | |
).asMultipartForm) |
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
####<Apr 6, 2015 7:42:25 PM SGT> <Error> <Class Loaders> <ISPS-APP> <AdminServer> <[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1428320545119> <BEA-2162500> <Class, org.eclipse.persistence.internal.indirection.jdk8.IndirectCollectionsProvider, was compiled with an incompatible version of Java. Make sure that all the classes needed by the application have been compiled with a compatible java version. java.lang.UnsupportedClassVersionError: org/eclipse/persistence/internal/indirection/jdk8/IndirectCollectionsProvider : Unsupported major.minor version 52.0 | |
java.lang.UnsupportedClassVersionError: org/eclipse/persistence/internal/indirection/jdk8/IndirectCollectionsProvider : Unsupported major.minor version 52.0 | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) | |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) | |
at weblogic.utils.classloaders.GenericClassLoader.defineCl |
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.sbangular.security.UnauthorisedEntryPoint; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
import org.springframework.boot.autoconfigure.security.SecurityProperties; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.annotation.Order; | |
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; | |
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; | |
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
import org.springframework.security.config.annotation.web.builders.WebSecurity; |
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
// Check for phantom | |
if ( !phantom.casperLoaded ) { | |
console.log( 'This script must be invoked using the casperjs executable' ); | |
phantom.exit( 1 ); | |
} | |
// get a Casper object. | |
// See http://casperjs.org/ | |
// Instantiate casper | |
var casper = require('casper').create({ |
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
// Take note to change the source code for the correct path | |
// Example of using when there are multiple templates | |
var preloading = Backbone.Marionette.TemplateCache.preloadTemplates(['template1','template2'], this); | |
$.when(preloading).done(function() { | |
// Do something | |
}); |
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
// Within a jsp page | |
<script> | |
var options.saved_values=JSON.parse('${it.json_string_from_Java}'); | |
var theBackboneModel = new TheBackboneModel(options.saved_values,{parse:true}); | |
</script> |
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 com.fasterxml.jackson.core.JsonFactory; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import javax.ws.rs.*; | |
import javax.ws.rs.core.MediaType; | |
import javax.ws.rs.core.Response; | |
@Path("/some_path") |
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
var express = require('express'); | |
var cons = require('consolidate'); | |
var http = require('http'); | |
var reload = require('reload'); | |
var app = express(); | |
var server = http.createServer(app); | |
// Assign the handlebars engine to .html files | |
app.engine('html', cons.handlebars); |
OlderNewer