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 / 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
@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 / 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 / anotes.md
Last active April 22, 2023 07:12
Java Exercise

Java Exercise

This are collection of java exercises. It was kinda fun ngl.

@lnfel
lnfel / Update-branch.md
Created December 21, 2022 11:26 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@lnfel
lnfel / ffmpeg_install_latest.md
Created December 15, 2022 00:56 — forked from teocci/ffmpeg_install_latest.md
Easy way to convert MKV to MP4 with ffmpeg

How to install FFmpeg on Ubuntu

FFmpeg is a free and open source command line tool for transcoding multimedia files. It contains a set of shared audio and video libraries such as: libavcodec, libavformat, and libavutil. With this tool, you can convert between various video and audio formats, set sample rates and resize videos.

In this document will show you how to install a stable version and the latest version of FFmpeg. This instructions apply for any Ubuntu based distribution, including Linux Mint and Elementary OS.

Prerequisites

In order to be able to add new repositories and install packages on your Ubuntu system, you must be logged in as a user with sudo privileges.

Installing FFmpeg 4.x on Ubuntu

<?php
namespace Tests;
use Mail;
use Swift_Message;
use Swift_Events_EventListener;
trait MailTracking
{
/**
* Delivered emails.
@lnfel
lnfel / php-ssl-install.sh
Created July 4, 2020 17:03 — forked from iamshreeram/php-ssl-install.sh
Installing SSL certificate in hostinger
# Installation of SSL Certificate
## Enable SSH :
ssh x123011738@31.170.164.22 -p 65002
## Download acme-client
git clone https://github.com/kelunik/acme-client
## Install composer
```
@lnfel
lnfel / fb.js
Created November 9, 2021 02:52 — forked from koistya/fb.js
Lazy loader for Facebook JavaScript SDK / Customer Chat SDK https://medium.com/p/5b7c21343048/
import loadScript from 'load-script';
let initialized = false;
let queue = [];
export function fb(callback) {
if if (initialized) {
callback(window.FB);
} else {
queue.push(callback);
@lnfel
lnfel / revert-a-faulty-merge.txt
Created October 18, 2021 01:07
Revert a faulty merge
source: https://mirrors.edge.kernel.org/pub/software/scm/git/docs/howto/revert-a-faulty-merge.txt
stackoverflow: https://stackoverflow.com/questions/1078146/re-doing-a-reverted-merge-in-git
Date: Fri, 19 Dec 2008 00:45:19 -0800
From: Linus Torvalds <torvalds@linux-foundation.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: Odd merge behaviour involving reverts
Abstract: Sometimes a branch that was already merged to the mainline
is later found to be faulty. Linus and Junio give guidance on
recovering from such a premature merge and continuing development
after the offending branch is fixed.