Skip to content

Instantly share code, notes, and snippets.

View jacricelli's full-sized avatar

Jorge Alberto Cricelli jacricelli

  • VEMO S.A
  • Zárate, Buenos Aires, Argentina
View GitHub Profile
@jacricelli
jacricelli / naturalCompare.js
Created May 19, 2020 00:53
Natural comparison
/**
* https://stackoverflow.com/a/15479354
*/
const naturalCompare = (a, b) => {
const ax = [];
const bx = [];
a.replace(/(\d+)|(\D+)/g, (_, $1, $2) => { ax.push([$1 || Infinity, $2 || '']); });
b.replace(/(\d+)|(\D+)/g, (_, $1, $2) => { bx.push([$1 || Infinity, $2 || '']); });
@jacricelli
jacricelli / Alternative_Excel_Unlock
Created February 5, 2020 18:46 — 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
@jacricelli
jacricelli / list-group.css
Created November 1, 2019 04:03
Bootstrap list-group-items as checkboxes and radio buttons (using pure CSS)
// https://codepen.io/lehonti/pen/OzoXVa
.list-group-item {
user-select: none;
border-left: none;
border-right: none;
border-color: rgba(0, 0, 0, .05);
}
.list-group {
height: 400px;
@jacricelli
jacricelli / aprompt.png
Created June 9, 2019 18:11 — forked from mislav/aprompt.png
My zsh prompt. No oh-my-zsh needed
aprompt.png
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]
"System.IsPinnedToNameSpaceTree"=dword:00000001
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities]
"ApplicationDescription"="@%ProgramFiles%\\Windows Photo Viewer\\photoviewer.dll,-3069"
"ApplicationName"="@%ProgramFiles%\\Windows Photo Viewer\\photoviewer.dll,-3009"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewer\Capabilities\FileAssociations]
".tif"="PhotoViewer.FileAssoc.Tiff"
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}]
"System.IsPinnedToNameSpaceTree"=dword:00000001
[HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}]
"System.IsPinnedToNameSpaceTree"=dword:00000001
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt]
@="@shell32.dll,-8506"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT\Directory\shell\cmdprompt\command]
@="cmd.exe /s /k pushd \"%V\""
@jacricelli
jacricelli / vista-fonts-installer.sh
Created April 8, 2019 03:34
Installing Vista Fonts in Ubuntu
#!/bin/sh
# Copyright (c) 2007-2018 Aristotle Pagaltzis
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@jacricelli
jacricelli / apcu.php
Created August 14, 2018 17:31
APCu - APC User Cache
<?php
/*
+----------------------------------------------------------------------+
| APC |
+----------------------------------------------------------------------+
| Copyright (c) 2006-2011 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |