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
<ExtractVariables name="Extract-Variables-1"> | |
<Source clearPayload="false">response</Source> | |
<JSONPayload> | |
<Variable name="city_name"> | |
<JSONPath>$.name</JSONPath> | |
</Variable> | |
</JSONPayload> | |
</ExtractVariables> |
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
<StatisticsCollector name="Statistics-Collector-1"> | |
<Statistics> | |
<Statistic name="devjam_{your initials}_cityname" | |
ref="city_name" | |
type="STRING">NO_CITY</Statistic> | |
</Statistics> | |
</StatisticsCollector> |
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
<ResponseCache name="Response-Cache-1"> | |
<CacheKey> | |
<Prefix/> | |
<KeyFragment ref="request.uri" type="string"/> | |
</CacheKey> | |
<Scope>Exclusive</Scope> | |
<ExpirySettings> | |
<TimeoutInSec ref="">60</TimeoutInSec> | |
</ExpirySettings> | |
</ResponseCache> |
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
internal class RawSerializer<T> | |
{ | |
public T RawDeserialize( byte[] rawData ) | |
{ | |
return RawDeserialize( rawData , 0 ); | |
} | |
public T RawDeserialize( byte[] rawData , int position ) | |
{ |
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
angular | |
// edit-in-place attribute | |
.directive( 'editInPlace', function() { | |
return { | |
restrict: 'A', | |
scope: { value: '=editInPlace', onSaveFn: '&onSave', onCancelFn: '&onCancel' }, | |
template: '<span ng-click="handleClick()" ng-bind="value"></span><input ng-model="modelCopy" style="width:100%;"></input>', | |
link: function ( $scope, element /* , attrs */ ) { | |
// Let's get a reference to the input element, as we'll want to reference it. |
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
// stringExtensions.js | |
// | |
// a few extensions on the string object. | |
// | |
// Fri, 10 Feb 2012 16:48 | |
// | |
(function(globalScope) { | |
if (typeof String.prototype.trim != 'function') { |
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
// contentNego.js | |
// | |
// Simple content negotiation logic for ASP-classic modules. | |
// | |
// This module exposes one public function - figureDesiredContentType(). | |
// It checks the HTTP_ACCEPT server variable (whose value is set to the | |
// value of the Accept request header), and sets a content-type | |
// mime-string accordingly. | |
// | |
// When there are multiple mime-types in the Accept header, or when the |
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.security.MessageDigest; | |
import org.apache.commons.codec.binary.Base64; | |
... | |
MessageDigest md = MessageDigest.getInstance("SHA256"); | |
byte[] hashBytes = md.digest(stringToHash.getBytes("UTF-8")); | |
String hashB64 = Base64.encodeBase64String(hashBytes); | |
... |
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
$ which openssl | |
/usr/bin/openssl | |
$ openssl version | |
OpenSSL 0.9.8zg 14 July 2015 | |
$ /usr/local/Cellar/openssl/1.0.2e_1/bin/openssl version | |
OpenSSL 1.0.2e 3 Dec 2015 |
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
$ brew update | |
$ brew install openssl |