Skip to content

Instantly share code, notes, and snippets.

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

Julio Lima julioflima

🏠
Working from home
View GitHub Profile
@julioflima
julioflima / install-chrome-config.sh
Last active November 19, 2020 03:11
Install Chrome on any Linux and install the extensiom Custom Javascript for Websites 2
#!/bin/bash
echo 'installing git'
sudo apt install git -y
git config --global user.name "Julio Lima"
git config --global user.email "julio_flima@hotmail.com"
clear
echo "Generating a SSH Key"
import axios, { AxiosRequestConfig } from 'axios';
import useAuth from 'hooks/useAuth';
const findOperationName = (gql: string) => {
const indexOfParentesis = gql.indexOf('(');
const indexOfSpaceNearParentesis = Array(...gql).reduce(
(acc, curr, index) => (curr === ' ' && indexOfParentesis - index > acc ? index : acc),
0
);
@julioflima
julioflima / widest-interval.js
Last active June 19, 2023 11:28
Google Step one
const data = [50, 60, 40, 80, 30, 56, 63, 42, 65, 23];
const findWidestInterval = (data) => {
if (Array.isArray(data) && !!data.length) {
const maxLostInterval = 0;
for (let i = 0; i < data.length - 1; i += 1) {
for (let j = i; j < data.length - 1; j += 1) {
const startPrice = data[i];
const endPrice = data[j];

Disable HTML Form Input Autocomplete and Autofill

  1. Add autocomplete="off" onto <form> element;
  2. Add hidden <input> with autocomplete="false" as a first children element of the form.
<form autocomplete="off" method="post" action="">
    <input autocomplete="false" name="hidden" type="text" style="display:none;">
    ...