Skip to content

Instantly share code, notes, and snippets.

View xergiodf's full-sized avatar
🏠
Working from home

Sergio Fernández xergiodf

🏠
Working from home
View GitHub Profile
@xergiodf
xergiodf / CopyFolder.gs
Created April 4, 2018 16:18
Functions to copy (backup) folders to a new destination. If there are too much files, the script fails.
/**
* Util function to copy one folder to another
* @param source
* @param target
* @private
*/
function __copyFolder(source, target) {
var folders = source.getFolders();
var files = source.getFiles();
@xergiodf
xergiodf / ZipFiles.gs
Last active April 4, 2018 16:20
Create a zip file containing folders and files from Google Drive. I was trying to create a zip backup file of all files and folders inside Google Drive, but the result is having all the files converted to PDF (it's the way BLOB works inside Google Apps Scripts)
/**
* Returns an Array of Blobs based on the Folder
* @param reFolder - Google Folder type
* @param path
* @returns {Array}
* @private
*/
function __getBlobsPath(reFolder, path) {
var blobs = [];
var files = reFolder.getFiles();
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@xergiodf
xergiodf / wildfly-install.sh
Created October 9, 2017 00:43 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@xergiodf
xergiodf / README.md
Created June 16, 2017 17:34 — forked from sgomezglobant/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@xergiodf
xergiodf / crawler.php
Created September 10, 2011 00:25 — forked from crodas/crawler.php
Bancard's goodness
<?php
/**
* Abrir la página de pago del comercio, la URL sería similar a esto:
*
* https://www.bancard.com.py/webbancard/?MIval=/ECOM/pagina_pagos.html&clavecomercio_input=29165&nro_pedido_input=416404080
*
* $com = clavecomercio_input = 29165
* $end = nro_pedido_input = 416404080
*/