Skip to content

Instantly share code, notes, and snippets.

Codeando Ando

Sergio López chechedotmx

Codeando Ando
View GitHub Profile
View Zapier SmartSheet Get Row Id.js
let uri = "";
let sheetId = inputData.sheetId;
let productCode = inputData.productCode;
let options = {
method: 'GET',
headers: {'Authorization': 'Bearer '+inputData.token}
productCode = parseInt(productCode,10);
from googleapiclient.discovery import build
import pprint
import csv
my_api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
my_cse_id = "xxxxxxxxxxxxxxx:xxxxxxxxxxxxx"
def google_search(search_term, api_key, cse_id, **kwargs):
service = build("customsearch", "v1", developerKey=api_key)
res = service.cse().list(q=search_term, cx=cse_id, **kwargs).execute()
return res['items']
chechedotmx / PalindromoMasGrande.cs
Created Apr 19, 2014
Palindromos de producto de 2
View PalindromoMasGrande.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AldeaDigital
class Program
chechedotmx / gist:7852449
Last active Dec 30, 2015
CMD Startup Task Azure to Install Crystal Reports and Fonts
View gist:7852449
@ECHO off
@REM Variables con las credenciales de Azure
set azurestoragename=xxxxxxxxxxxxxx
set azurestoragekey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==
set storagecontainername=xxxxx
@REM Azure Drive
@REM (A veces E:, A veces F:)
set drive=%cd:~0,3%
chechedotmx / gist:7852376
Created Dec 8, 2013
Service Definition with Startup task executionContext elevated
View gist:7852376
<?xml version="1.0" encoding="utf-8"?>
<ServiceDefinition name="XentinelCloudInvoicingThreading" xmlns="" schemaVersion="2012-10.1.8">
<WorkerRole name="XentinelCloudInvoicingThreadingService" vmsize="ExtraSmall">
<Runtime executionContext="elevated" />
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
chechedotmx / GetSasFromURL_AMS.js
Last active Dec 23, 2015
This codes retreives an existing blob URL with sas with permissions to write an Azure Blob, but this time using javascript from Node.js, working on Azure Mobile Services
View GetSasFromURL_AMS.js
var azure = require('azure');
var blobService = azure.createBlobService('storageAccountName', 'storageAccountKey', 'host');
blobService.createContainerIfNotExists(containerName, {
publicAccessLevel : 'blob'
}, function(error) {
if (error) {
console.log("Error : " + error);
var mins = 10;
chechedotmx / GetBlobUriWithSAS.cs
Created Sep 13, 2013
This codes retreives an existing blob with permissions to read, Azure Blob, C# Then for example we get this data to a byte array
View GetBlobUriWithSAS.cs
public String GetBlobUriWithSAS(String containerName, String blobName)
CloudBlobContainer container = this._blobClient.GetContainerReference(containerName);
CloudBlockBlob blockBlob = container.GetBlockBlobReference(blobName);
String sharedAccesSignature = blockBlob.GetSharedAccessSignature(new SharedAccessBlobPolicy()
Permissions = SharedAccessBlobPermissions.Read,
SharedAccessExpiryTime = DateTime.UtcNow + TimeSpan.FromMinutes(10)
chechedotmx / gist:5696213
Last active Dec 18, 2015
Simple way to request blitline from azure mobile services or nodejs, without getting 411 errors, and string not matched
View gist:5696213
var foo = function() {
return {
sendHttpPostToBlitline : function(job_data, callBackBitline) {
var http = require('http');
var json_job_data = new Object();
json_job_data.json = job_data;
var job_data_stringified = JSON.stringify(json_job_data);
var options = {
host : '',
port : 80,