Skip to content

Instantly share code, notes, and snippets.

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

Dale Ryan lnfel

🏠
Working from home
View GitHub Profile
@lnfel
lnfel / jsont.js
Created August 16, 2023 08:33 — forked from jonathanlurie/jsont.js
Serialize/deserialize json and conserve typed arrays
/*
Author: Jonathan Lurie - http://me.jonathanlurie.fr
License: MIT
The point of this little gist is to fix the issue of losing
typed arrays when calling the default JSON serilization.
The default mode has for effect to convert typed arrays into
object like that: {0: 0.1, 1: 0.2, 2: 0.3} what used to be
Float32Array([0.1, 0.2, 0.3]) and once it takes the shape of an
object, there is no way to get it back in an automated way!
@lnfel
lnfel / redis-setup-windows.txt
Created April 23, 2021 02:24
Laravel 8 Redis setup on Windows with xampp
Laravel 8 Redis setup on Windows with xampp
Note: test done using windows 7
1. Install predis on your project
https://laravel.com/docs/8.x/redis#introduction
composer require predis/predis
- un-comment 'Redis' => Illuminate\Support\Facades\Redis::class, in your config/app.php
- on your .env make sure you have the following variables:
@lnfel
lnfel / note.txt
Last active September 25, 2023 01:23
Rails 6.0.3.2 on Termux
Rails 6.0.3.2 on Termux
pkg upgrade
pkg install ruby vim git nodejs
nokogiri will build natively and would need the ff packages and will need pkg-config to find them:
libxml-2
libxslt
libexslt