Skip to content

Instantly share code, notes, and snippets.

View michaelbaudino's full-sized avatar

Michael Baudino michaelbaudino

View GitHub Profile
@michaelbaudino
michaelbaudino / decode_session_cookie.rb
Last active February 15, 2018 11:03 — forked from pdfrod/decode_session_cookie.rb
A simple script to decode Rails 4 session cookies
@michaelbaudino
michaelbaudino / improve-harvest-new-invoice.js
Last active August 30, 2021 08:57
Harvest improvements
function numberFormat(number, decimals, decPoint, thousandsSep) { // Shamelessly copied from http://locutus.io/php/number_format/
number = (number + '').replace(/[^0-9+\-Ee.]/g, '');
var n = !isFinite(+number) ? 0 : +number;
var prec = !isFinite(+decimals) ? 0 : Math.abs(decimals);
var sep = (typeof thousandsSep === 'undefined') ? ',' : thousandsSep;
var dec = (typeof decPoint === 'undefined') ? '.' : decPoint;
var s = '';
function toFixedFix(n, prec) {
var k = Math.pow(10, prec);
@michaelbaudino
michaelbaudino / advancedsettings.xml
Created June 11, 2018 13:32
Kodi full disk caching configuration for potentially slow, remotely mounted filesystems
<!--
This configuration will tell Kodi to cache:
* without size limit
* 40 times more data than the minimum required
* on disk (rather than in RAM)
* even for local filesystems (so NFS, any FUSE-based filesystems are covered)
Copy this file in ~/.kodi/userdata/advancedsettings.xml (or merge it with the existing one)
-->