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
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_CURRENT_USER\Software\Classes\CLSID\{645FF040-5081-101B-9F08-00AA002F954E}]
"System.IsPinnedToNameSpaceTree"=dword:00000001
@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
@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 / 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 / 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 / forticlientsslvpn-expect.sh
Last active May 31, 2020 23:29 — forked from mgeeky/forticlientsslvpn-expect.sh
Simple script intended to automate Fortinet SSL VPN Client connection on Linux using expect scripting.
#!/bin/bash
# init only
CONNECT_PID=""
RUNNING=""
# Provide required parameters
FORTICLIENT_PATH="/opt/forticlient-sslvpn/64bit/forticlientsslvpn_cli"
VPN_HOST="<HOST:PORT>"
VPN_USER="<USER_NAME>"
<?php
$adServer = "ldap://ip";
$ldap = ldap_connect($adServer);
$username = '';
$password = '';
$ldaprdn = 'DOMAIN' . "\\" . $username;
ldap_set_option($ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldap, LDAP_OPT_REFERRALS, 0);
ldap_set_option($ldap, LDAP_OPT_NETWORK_TIMEOUT, 10);
$bind = ldap_bind($ldap, $ldaprdn, $password);
<?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: |
@jacricelli
jacricelli / composer.json
Created April 5, 2021 12:00 — forked from rococodogs/composer.json
cron'd php script to scrape our Ricoh printer's page counts to keep a running tally on our end
{
"require": {
"sunra/php-simple-html-dom-parser": "1.5"
}
}