This file contains hidden or 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 hidden or 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
| development: | |
| adapter: mysql2 | |
| encoding: utf8 | |
| database: my_database | |
| username: root | |
| roles: | |
| - admin | |
| - developer | |
| - guest | |
| password: |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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'), // 4.x | |
| bodyParser = require('body-parser'), // express 4.x requires this | |
| yql = require('yql'), | |
| urlparse = require('url'); | |
| // Set up Express environment and enable it to read and write JSON bodies | |
| var app = express(); | |
| app.use(bodyParser.json()); // for parsing application/json | |
| // Generic Send Error Function |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>local.screenshot.fixup</string> | |
| <key>Program</key> | |
| <string>/Users/YOURSELF/dev/bash/fixupScreenshotName.sh</string> | |
| <key>RunAtLoad</key> | |
| <false/> |
This file contains hidden or 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 | |
| # -*- mode:shell-script; coding:utf-8; -*- | |
| # | |
| # fixupScreenshotName.sh | |
| # | |
| # The MIT License (MIT) | |
| # | |
| # Copyright (c) 2014 by Dino Chiesa | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy |
This file contains hidden or 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
| /* | |
| * ugCollectionForEachPaging | |
| * | |
| * Iterates through all items in a collection within | |
| * Apigee Edge BaaS. Uses the Usergrid client object from the usergrid | |
| * module. Notice - this logic calls {has,get}NextPage(). | |
| * | |
| * @param ugClient - the authenticated client object | |
| * @param options - the options for a collection. Pass type and qs. | |
| * @param f - function called with each UG entity. Accepts a single argument. |
This file contains hidden or 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
| /* | |
| * ugCollectionForEach | |
| * | |
| * Iterates through all items IN A SINGLE PAGE of a collection within | |
| * Apigee Edge BaaS. Uses the Usergrid client object from the usergrid | |
| * module. Notice - this logic does not call {has,get}NextPage(). | |
| * | |
| * @param ugClient - the authenticated client object | |
| * @param options - the options for a collection. Pass type and qs. | |
| * @param f - function called with each UG entity. Accepts a single argument. |