Skip to content

Instantly share code, notes, and snippets.

View lindajess's full-sized avatar

Linda Gutiérrez lindajess

View GitHub Profile
https://fal.ai/dashboard/keys
https://lightning.ai/
FLUX
https://blackforestlabs.ai/#get-flux
https://flux1.ai/create
https://huggingface.co/spaces/SkalskiP/FLUX.1-inpaint
SD
SECURITY & AUTH
SWAGGER for docs
- https://swagger.io/docs/specification/about/
HTTP RFC auth schemes
- https://www.developerro.com/2019/03/12/jwt-api-authentication/
@lindajess
lindajess / Api.js
Created June 24, 2020 15:55
[Self DOC] Yielded requests cancellation using sagas & axios with a cancelation token
import axios from 'axios'
const Api = {
get: (url, config = {}) => {
return axios.get(url, config)
}
}
export default Api
// NETWORK
Show local & public IP
ip -s -c -h a (linux)
/sbin/ifconfig (mac)
Default served IP
0.0.0.0
function filterElement(arr, element) {
return arr.filter(item => item.split("").sort().join("") !== element.split("").sort().join(""))
}
function filterAnagrams(text, i = 0) {
if (text.length === i || text.length === 1 || text.length === 0) return text
let newArray = filterElement(text, text[i])
return filterAnagrams([text[i], ...newArray], i + 1)
}
function filterElement(arr, element) {
return arr.filter(item => item.split("").sort().join("") !== element.split("").sort().join(""))
}
function filterAnagrams(text, i = 0) {
if (text.length === i || text.length === 1 || text.length === 0) return text
let newArray = filterElement(text, text[i])
return filterAnagrams([text[i], ...newArray], i + 1)
}
@lindajess
lindajess / 1-win-or-not.js
Last active February 27, 2020 23:21
Logic Simplification Problem
const a = false;
const b = true;
const c = true;
if (/* Write logic Here */)
console.log('team wins')
else console.log('team dont win')
if (/*Write simplified logic here*/) console.log('team wins')
else console.log('team dont win')
@lindajess
lindajess / counter-down.html
Created February 27, 2020 05:51
Logic Problem
<!--
Constraints:
url param is going to be in Minutes and wont be greater than 60
you are not allowed to use Date object or any library like moment
Hints:
- use setInterval(function(), delay) or setTimeOut(funtion(), delay) to count down,
- use document.getElementById('--').textContent = "" or document.getElementById('--').innerHTML to insert time down counter in the DOM element
@lindajess
lindajess / anagram.js
Last active February 27, 2020 23:10
Warming Up - Second Problem
/**
* execute: node anagram-blp.js word
* if not word print: "there is not word"
* if word, find anagrams in the file; print them and from "isAnagram" function and return true/false.
*/
const assert = require('assert');
var fs = require('fs');
@lindajess
lindajess / case-description.txt
Last active February 27, 2020 23:22
Warming Up - First Problem
A word is palindrome when it can be read the same from left to righ and from righ to left
Ex: "ama" and "reconocer" are palindrome words.
Problem: Given a word return true if it palindrome.
Input: word
Expected: Output booleand value (true if palindrome, false if not palindrome)