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
@eusonlito
eusonlito / README.md
Last active May 14, 2024 03:22
Laravel Auth and Session without database. Using a remote API as Auth and Data provider.

This is an example of a web that uses a remote API as a database wrapper.

The remote API is stateless and the web uses cookies to maintain session persistence.

The API authentication endpoint returns a TOKEN that allows the web to make each request to the API with the user authentication header.


Este es un ejemplo de web que usa una API remota como wrapper de base de datos.

@kosamari
kosamari / how_i_got_into_google.md
Last active November 1, 2023 02:16
Google に入るまでの話

Googleに入るまでの話 (Developer Relations)

コンテキスト: https://togetter.com/li/1331865

前提条件

部署

グーグルジャパンではなくてUSの本社での採用の話。私が受けたのはSoftware EngineerではなくてDeveloper Advocate。Engineering組織の下についているのでコーディング面接有り。ただし評価項目がSWEとは異なる。

英語

@koistya
koistya / fb.js
Created March 18, 2019 08:21
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);
@teocci
teocci / ffmpeg_install_latest.md
Last active September 13, 2023 02:17
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

@iamshreeram
iamshreeram / php-ssl-install.sh
Created December 30, 2018 06:41
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
```
@hideya
hideya / flex-wrap-anim.js
Last active April 25, 2023 05:49
CSS Flex Wrap Animation (code assumes no change in items except xy coords): https://codepen.io/hideya/pen/Jamabx
window.addEventListener('load', function(event) {
var targetClassName = 'flex-wrap-anim';
var defaultDuration = '0.3s';
var dummyList = [];
function addDummy(item, duration) {
var top = item.offsetTop;
var left = item.offsetLeft;
setTimeout(function() {
item.style.position = 'absolute';
@onizuka17
onizuka17 / index.html
Created September 7, 2018 03:03
Slider and Lightbox :: slider (swiper.js) & Lightbox gallery (photoswipe.js)
<h1>
<a title="swiper.js" href="http://idangero.us/swiper/" target="_blank">Swiper.js (4.3.5)</a>
&
<a title="photoswipe" href="http://photoswipe.com/" target="_blank">Photoswipe.js (4.1.1)</a>
- Mobile Native feel slider gallery
</h1>
<p>Combine two of the most powerfull JS plugins (Endless options / Great docs / Fast / Modern / Mobile freindly) - <a title="swiper.js" href="http://idangero.us/swiper/" target="_blank">SWIPER</a> IS PERFECT FOR THIS IDEA BEACUSE OF ITS unique <code>preventClicks</code> Parameter (Prevent accidental unwanted clicks on links during swiping) - <strong>Works like magic</strong>. Also its really <b>hard</b> to find - Code example of working photoswipe combination with any slider out there(slick, flickity, owl etc.) and in general slider & lightbox - so i hope this example be usefull for you.</p>
<!-- Slider main container -->
<div class="swiper-container">
@ityouknow
ityouknow / LICENCE SUBLIME TEXT
Created June 24, 2018 08:36
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@joeytwiddle
joeytwiddle / async-await-forEach-alternatives.md
Last active May 30, 2024 14:04
Do not use forEach with async-await

Do not use forEach with async-await

TLDR: Use for...of instead of forEach() in asynchronous code.

For legacy browsers, use for...i or [].reduce()

To execute the promises in parallel, use Promise.all([].map(...))

The problem

@maxivak
maxivak / webpacker_rails.md
Last active April 13, 2023 18:46
Webpack, Yarn, Npm in Rails