Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Heavyblade / dropbox.js
Created February 22, 2018 13:30
dropbox.js
#include "(CurrentProject)/ajax.js"
importClass( "VFile" );
importClass( "VProcess" );
var charsToEncode = /[\u007f-\uffff]/g;
function httpHeaderSafeJson(args) {
return JSON.stringify(args).replace(charsToEncode, function (c) {
return '\\u' + ('000' + c.charCodeAt(0).toString(16)).slice(-4);
@Heavyblade
Heavyblade / download.js
Created February 22, 2018 13:29
download.js
#include "(CurrentProject)/dropbox.js"
var download_folder = theRoot.varToBool("DOWNLOAD_FOLDER");
theApp.setGlobalVar("vDropboxDat/WORKING", 1);
if ( download_folder ) {
getRootFiles(theRoot.varToString("PATH"), function(entries) {
entriesToQueue( entries, theRoot.varToString("TO") );
});
} else {
@Heavyblade
Heavyblade / dropbox.js
Created February 21, 2018 20:53
dropbox.js
#include "(CurrentProject)/ajax.js"
importClass( "VFile" );
importClass( "VProcess" );
var charsToEncode = /[\u007f-\uffff]/g;
function httpHeaderSafeJson(args) {
return JSON.stringify(args).replace(charsToEncode, function (c) {
return '\\u' + ('000' + c.charCodeAt(0).toString(16)).slice(-4);
@Heavyblade
Heavyblade / fliter.js
Created February 13, 2018 15:25
filter.js
function processActiveCalls(activeCalls, callSt) {
if (callSt.hangedUp) {
callSt.activeCalls = [];
callSt.isIncall = false;
callSt.isIncomingCall = false;
callSt.hangedUp = false;
} else {
if (activeCalls && activeCalls.length) {
var currentCall = activeCalls[0];
@Heavyblade
Heavyblade / transaccion.js
Created November 25, 2017 16:59
transaccion
if ( theRoot.beginTrans("Guardando linea Movil") ) {
var lineas = getRecords("DATOKCLUB/LN_MOV", lineaMov.msisdn, "MSISDN"),
i = lineas ? lineas.size() : 0,
clientId = theRegisterIn.fieldToInt("CLN"),
record, linea;
if ( i > 1 ) {
while(i--) {
record = lineas.readAt(i);
@Heavyblade
Heavyblade / pr.md
Created November 24, 2017 18:59
pr

This PR along with the one on calendar proxy add do 3 things:

  1. Make changes so the pooling can detect incomming calls that are just "ringing".
  2. Adds code to retrieve and store the gs configuration for autnanswer calls.
  3. Adds FE code to show an overlay when an incomming call is detected and the settings for autoanswer are set to not
@Heavyblade
Heavyblade / cliente.json
Created November 19, 2017 13:09
cliente.json
{"boton_pulsado":null,"cliente":{"LOPD_activo":false,"apellidos":"Japon Casado","apellidosFijo":"JaponCASADO","clienteValor":true,"cobertura":null,"contactApellidos":"Japon Casado","contactApellidosFijo":"JaponCASADO","contactEmail":"","contactEmailFijo":"coria@okclub.es","contactNombre":"Candelaria","contactNombreFijo":"Candelaria","contactTelefono":"954771264","contactTelefonoFijo":"955220881","cuentaBancaria":"21002613240110414435","cuentaBancariaFijo":"21002613240110414435","custCodeFacturacion":"1.54756902","custCodes":["1.54756902","1.52911364"],"datosAutorizado":[{"autAddNote1":"","autAddNote2":"","autAddNote3":"","autAddressNum":"NERVION","autCP":"41100","autCargo":"","autCity":"CORIA DEL RIO","autEmail":"","autFax":"","autIdentityNum":"52694933R","autIdentityType":"2","autLanguage":"Castellano","autLastname":"JAPON CASADO","autNacionalidad":"España","autName":"CANDELARIA","autState":"SEVILLA","autTelefono1":"954771264","autTelefono2":"","autTipoVia":"CALLE","autTitulo":"Señora","epigrafeIAE":"","fech
@Heavyblade
Heavyblade / dudaso
Created November 19, 2017 03:17
dudasOK
- que es TARIFA ?
- que va en fecha , fecha de que ?
@Heavyblade
Heavyblade / regalos
Last active November 18, 2017 03:58
regalos.md
1. aspiradora para auotomovil
https://articulo.mercadolibre.com.co/MCO-446195798-aspiradora-para-carro-12v-daewoo-_JM
2. Libro malcom gladwell
https://www.librerianacional.com/pagina=producto&libro=311575&autor=15419&editorial=3669
3. Audifonos Sennheiser
https://articulo.mercadolibre.com.co/MCO-456557678-auriculares-sennheiser-502813-hd180-over-ear-wired-black-_JM
4. Boxers
importClass("XMLHttpRequest");
importClass( "VFile" );
function readFile(path) {
var fi = new VFile( path );
if ( fi.open( VFile.OpenModeReadOnly ) ) {
return( {name: fi.info().fileName(), array: fi.readAll()} );
fi.close();
} else {