Skip to content

Instantly share code, notes, and snippets.

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

Leonardo Vidal lvidal1

🏠
Working from home
View GitHub Profile
@lvidal1
lvidal1 / README-Template.md
Created August 2, 2020 01:38 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@lvidal1
lvidal1 / caffelli.patt
Created August 13, 2019 19:21
Caffelli marker pattern for AR
253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253
253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253
247 247 247 247 247 247 247 247 247 247 247 247 247 247 247 247
86 86 86 86 86 86 86 86 86 86 86 86 86 86 86 86
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 19 22 22 22 22 22 22 22 22 22 22 20 0 0
0 0 41 11 16 13 11 12 15 11 12 12 11 39 0 0
0 0 38 32 37 52 20 32 51 25 68 82 16 35 0 0
0 0 38 33 34 78 61 37 30 79 103 86 38 36 0 0
0 0 40 7 18 15 15 8 8 17 13 11 10 38 0 0
@lvidal1
lvidal1 / comment-standard.txt
Created May 2, 2018 22:44
Standards on commenting based on phpcs definitions
/**
* PHP version 5.6
* ContestController.php
*
* @category Controller
* @package Http
* @author Leonardo Vidal <leonardo@caffelli.com>
* @copyright 2018 Caffelli
* @license Licence Name
* @link http://gitlab.caffelli.com
@lvidal1
lvidal1 / linkedin-transition.css
Created March 23, 2018 19:22
linkedin chat box transition
{"ease":".25,.1,.25,1","linear":"0,0,1,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1","0,0,.2,1":"0,0,.2,1"}
@lvidal1
lvidal1 / server.conf
Created March 5, 2018 21:39
Nginx configuration file using php7.1
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
@lvidal1
lvidal1 / rtl8723BE-setup.txt
Created August 1, 2017 02:29
Realtek RTL8723BE weak wifi signal and disconnects
1. Open Terminal, and then
iwconfig
and note down the wl* number.
2. Download new driver. Download rock.new_btcoex from GIT and unzip it to the desktop for example.
3. Again in Terminal type and run:
cd Desktop/rtlwifi_new-rock.new_btcoex
make
sudo make install type your ubuntu password.
sudo modprobe -rv rtl8723be
sudo modprobe -v rtl8723be ant_sel=2
@lvidal1
lvidal1 / apollo.auth-header.ts
Created July 18, 2017 20:19
Apollo middleware with Authorization header
networkInterface.use([{
applyMiddleware(req, next) {
let authToken = localStorage.getItem("authToken");
if (authToken) {
req.options.headers = Object.assign({},req.options.headers, {
authorization: `Bearer ${authToken}`
});
}
next();
}
@lvidal1
lvidal1 / rx-debounce-typing.ts
Created July 3, 2017 05:54
Debounce on typing with Rxjs (pluck operator)
var input = document.querySelector('input');
var observable = Rx.Observable.fromEvent(input,'input');
observable
.pluck('target','value') // nested attributes from event
.filter((v)=> v.length > 0)
.debounceTime(500)
.distinctUntilChanged()
.subscribe({
next: function(e){
@lvidal1
lvidal1 / rx-debounce-typing.ts
Created July 3, 2017 05:44
Debounce on typing with Rxjs
var input = document.querySelector('input');
var observable = Rx.Observable.fromEvent(input,'input');
observable
.map(e => e.target.value)
.filter((v)=> v.length > 0)
.debounceTime(500)
.distinctUntilChanged()
.subscribe({
next: function(e){
@lvidal1
lvidal1 / server.graphql.ts
Created June 8, 2017 06:38
Very "Hello-world" for graphql server - Credit Udemy:GraphQL for Absolute Beginners: The Newbie Guide
var {graphql, buildSchema} = require('graphql');
var schema = buildSchema (`
type Query{
hello : String
}
`);
var root = {
hello: () => {
return 'Hello World.';