Skip to content

Instantly share code, notes, and snippets.

View avambro's full-sized avatar
🏠
Working

Carlos Avalos avambro

🏠
Working
View GitHub Profile
@avambro
avambro / Alternative_Excel_Unlock
Created June 5, 2019 17:50 — forked from vaderj/Alternative_Excel_Unlock
Two methods of unlocking a locked excel sheet: VBA macro for Excel that should unprotect a password protected sheet, Opening the spreadsheet as XML and removing the specific piece
Step 1. Make a copy of the spreadsheet in an empty directory. Rename the extension to .zip
Step 2. Extract the zip file.
Step 3. In the extracted contents, goto the folder \xl\worksheets\
Step 4. There should be one xml file per sheet? I editing "sheet1.xml" with NotePad++. From nearly the very end of the file, remove the tag that starts with:
<sheetProtection
My entire tag was as follows:
<sheetProtection algorithmName="SHA-512" hashValue="ALciNBSIqRcjDiFbCuyWoGk4iOcC/ZRKnEjwEVi1skb6G5JbHhp+QVZ9+rlPVbGILOS7lYiCvJmR4Q7IuSphXA==" saltValue="8OVKXrG0VacLOLVztUpEYw==" spinCount="100000" sheet="1" objects="1" scenarios="1" selectLockedCells="1"/>
Step 5. Save the file. Open the ZIP file in 7zip, find the same file, drag and drop, save, exit, rename the file back to (xlsx) and open
@avambro
avambro / replace.sh
Created October 2, 2018 18:36
One way of running a find / replace in many files
#File: file.list.txt
#/path/to/file/1.txt
#/path/to/file/2.txt
#/path/to/file/3.txt
#! /user/bin/env bash
while IFS="" read -r p || [ -n "$p" ]
Display links when the <a> has no text value but the href attribute has a link:
a[href^="http"]:empty::before {
content: attr(href);
}
@avambro
avambro / UserSettings.json
Created March 24, 2018 03:29
User Settings for Sublime Text 3
{
"auto_complete_delay": 5,
"auto_complete_selector": "source, text",
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"create_window_at_startup": false,
"extra_file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
@avambro
avambro / find_files_and_delete.sh
Created June 24, 2017 04:35
find files with interval dates and delete them
touch -d "2016-01-01 00:00:00" /tmp/date.start;
touch -d "2016-12-31 23:59:59" /tmp/date.end;
sudo find ./ -type f -newer /tmp/date.start ! -newer /tmp/date.end -exec rm {} +
@avambro
avambro / binbash
Created October 17, 2012 16:34
Imprime el directorio indicado en 7 columnas
Imprime el directorio indicado en 7 columnas
"ls /etc | pr -T7"
@avambro
avambro / binbash
Created October 17, 2012 16:33
mostrar los 10 comandos que mas utilizas
Muestra los 10 comandos que más utilizas y el número de veces que los has usado.
"history| awk '{print $2}' | sort|uniq -c| sort -r -n|head"
@avambro
avambro / binbash
Created October 17, 2012 16:31
find not images
Cómo encontrar archivos en un directorio que NO SEAN imagenes en #linux:
find . -type f -exec file -i '{}' | grep -v "image" \;