Skip to content

Instantly share code, notes, and snippets.

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

abdias abdiasriver

🏠
Working from home
View GitHub Profile
@abdiasriver
abdiasriver / App-script-Copiar-solo.archivos-de-una-carpeta-a-otra-destino-Gdrive.gs
Last active August 15, 2021 15:13
App-script-Copiar-solo.archivos-de-una-carpeta-a-otra-destino-Gdrive.gs
/* Copiar
los archivos de una carpeta a una carpeta nueva, solo los archivos de la carpeta.
Cambia IDCARPETAORIGEN por el ID de la carpeta de origen
Cambia IDCARPETADESTINO por el ID de la carpeta Destino
*/
function copyDriveWithPermissions(){
var originFolder = DriveApp.getFolderById("1jADbmx_fF9g1qG2uL0hY99wBLd_7x1fN");
var destinationFolder = DriveApp.getFolderById("1szpchDw4WEHu1esSq-1B72rI5U8mnOE8");
var currentFolder = destinationFolder;
var totalCount = traverseFolder(originFolder,0, currentFolder);
function start() {
/* Funcionando
Cambia IDCARPETAORIGEN por tu ID
Cambia NOMBRENUEVACARPETA por el nombre de tu nueva carpeta
*/
var sourceFolder = DriveApp.getFolderById('IDCARPETAORIGEN');
var targetFolder = "CLONES";
var source = DriveApp.getFoldersByName(sourceFolder);
var target = DriveApp.createFolder(targetFolder);
function copyDocs() {
for(i=0; i<1; i++){ //Cambia el 1 por las copias que quieras en la carpeta.
//Abre lo que quieras copiar en el navegador
//Checa en url unas letras que definen el ID del documento o archivo
//Copia el ID del archivo y pegalo en IDARCHIVOORIGEN
//Notice there are single quotations around the document ID, that is important!
source_file = DriveApp.getFileById('IDARCHIVOORIGEN');
@abdiasriver
abdiasriver / App-script-obtener-ID-desde-url-gdrive.gs
Last active August 11, 2021 21:00
App-script-obtener-ID-desde-url-gdrive.md
function extractUrlID() {
// Cambia PEGALAURLAQUI por la url ejemplo https://drive.google.com/file/d/1pYOc5rVnGRZsVC9rjPbOemj2dc1E5ZYw/view url gdrive
var Url = 'PEGALAURLAQUI';
// use a regex to extract the ID
var expression = Url.match(/[-\w]{25,}/);
Logger.log(expression);
/*
Nota:
> Propietario actual debe tener permisos de EDITOR
> El Nuevo Propietario recibira un nuevo correo
*/
function changeOwnership() {
// folder principal de escaneado
var sourceID = "IDCARPETA"; // Cambiar IDCARPETA por el id de tu carpeta a escanear
@abdiasriver
abdiasriver / Windows-TI-2021-instalacion-y-activacion.md
Last active August 14, 2021 00:53
INStalacion ya activacion de WIndows 2021 TI
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<center>
@abdiasriver
abdiasriver / App-script-cambiar-permisos-a-carpetas-y-archivos-de-forma-recursiva-en-drive.gs
Last active August 15, 2021 17:50
App script cambiar permisos a grupo de carpetas y archivos en GDRIVE
// Cambiar linea 5 el ID de la carpeta y en 18,19 y 80 a los permisos que desees
function changepermission() {
// folder principal de escaneado
var sourceID = "IDCARPETA"; // Coloca aqui el ID de tu folder
// Funcion para escanear sub-folders/files
folderAndFiles(sourceID);
#TAG NAME IN REPO (or git url) PURPOSE (should be a verb phrase to sound right while installing)
i3-gaps is the main graphical user interface and window manager.
xorg-server is the graphical server.
xorg-xwininfo allows querying information about windows.
xorg-xinit starts the graphical server.
sxhkd binds key.
ttf-inconsolata is the monospace font of LARBS.
ttf-linux-libertine provides the sans and serif fonts for LARBS.
vifm is an extensive terminal file manager that everyone likes.
ed is the standard editor!
@abdiasriver
abdiasriver / Generacion-sitio-hugo-github-ssh.md
Last active April 13, 2018 06:27
Generacion-sitio-hugo-github-ssh

GENERACION DEL SITIO CON HUGO Y GITHUB USANDO SSH

Blog= el backup de hugo con todo

Sitio= Los archivos estaticos o la web lista.

mkdir blog
cd blog
hugo new site .
git init