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
require('expose?gapiCallback!./google-client-code'); | |
require('expose?gmapsCallback!./google-maps-code'); | |
$script('https://maps.googleapis.com/maps/api/js?onload=window.gapiCallback','google-maps'); | |
$script('https://apis.google.com/js/client.js?callback=window.gmapsCallback','google-api'); |
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
public with sharing class RsaEncryption { | |
private String modulus; | |
private String exponent; | |
// Hex digits | |
private static final String DIGITS = '0123456789abcdef'; | |
private static final Decimal HEX_BASE = 16; | |
public RsaEncryption(String modulus, String exponent) { |
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 passport = require('passport'), | |
BitbucketStrategy = require('passport-bitbucket').Strategy, | |
request = require('request'); | |
module.exports = function (app) { | |
var oauth = { | |
consumer_key: process.env.BB_CONSUMER_KEY, | |
consumer_secret: process.env.BB_CONSUMER_SECRET | |
}; |
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
/* | |
* Apex doesn't expose dependent picklist info directly, but it's possible to expose. | |
* Approach: | |
* * Schema.PicklistEntry doesn't expose validFor tokens, but they are there, and can be accessed by serializing to JSON | |
* (and then for convenience, deserializing back into an Apex POJO) | |
* * validFor tokens are converted from base64 representations (e.g. gAAA) to binary (100000000000000000000) | |
* each character corresponds to 6 bits, determined by normal base64 encoding rules. | |
* * The binary bits correspond to controlling values that are active - e.g. in the example above, this dependent option | |
* is available for the first controlling field only. | |
* |