Skip to content

Instantly share code, notes, and snippets.

Avatar

Jose Fernando Mitre Alvarez fernandomitre7

View GitHub Profile
View entrevista.js
var test = (function ($, document) {
function doSomethingMethod () {
console.log(‘do something!);
}
return {
doSomething: doSomethingMethod
};
})(window.jQuery, window.document);
View CallerIds.json
{
"caller_ids": [
{
"active": false, //Value that indicates if the caller id is active, if it is active we can use it (I don't think we use this value)
"id": "a035000000SstJ7AAJ",
"name": "MX Mobile",
"number": "5218117997371", //duplicated values
"phone": "5218117997371",
"selected": false //Value that indicates if this caller id is selected to be used. Only 1 can be selected at a time
}
View TwilioUsage.json
{
"category": "recordings",
"description": "Recordings",
"account_sid": "AC1001e3115d52a64e3b4c9ecd3d4d2ad3",
"start_date": "2016-07-14",
"end_date": "2016-08-10",
"count": "30",
"count_unit": "recordings",
"usage": "31",
"usage_unit": "recorded-minutes",
View Search.cls
public static List<Map<String, String>> search(string keySearch, Map<String, List<String>> objects) {
String searchQuery = 'FIND \'*' + String.escapeSingleQuotes(keySearch) + '*\' IN ALL FIELDS RETURNING ';
List<List<SObject>> searchList;
Integer i = 0, j = 0;
String currentObject;
//Creating the dynamic query
for (String key : objects.keySet()) {
i++;
j = 0;
View GenerateSignature.java
/**
* Este metodo es el que genera la firma
* url es el url que estamos llamando String url = containerReqCtxt.getUriInfo().getAbsolutePath().toString();
* params es el mapa con los query params y body params (ver metodo extractInputParams)
* authkey es la llave secreta
*/
public static String generateSignature(String url,
Map<String, Object> params, String authKey)
throws NoSuchAlgorithmException, InvalidKeyException,
IllegalStateException, UnsupportedEncodingException {
View Document_Transform_Merge.json
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": [
{
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
{
View Word_Document_Transform.json
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
"sections" : [
{
@fernandomitre7
fernandomitre7 / Word_Document_Transform_List.json
Last active Mar 4, 2016
New complex merge, schema structure example.
View Word_Document_Transform_List.json
{
"sections": [
{
"url": 'pah/to/template/url.docx',
"template": '(OPTIONAL)BASE64_ENCODED_FILE',
"substitutions": {
"key1": "value1",
"key2": "value2",
"key3": "value3"
},
You can’t perform that action at this time.