Skip to content

Instantly share code, notes, and snippets.

View iddar's full-sized avatar
🤹‍♂️
code juggling

Iddar Olivares iddar

🤹‍♂️
code juggling
View GitHub Profile
@iddar
iddar / ai_channels.md
Created February 19, 2024 00:18
Interesting list of YT channels about AI
@iddar
iddar / fast_speech_text_speech.py
Created February 16, 2024 04:13 — forked from thomwolf/fast_speech_text_speech.py
speech to text to speech
""" To use: install LLM studio (or Ollama), clone OpenVoice, run this script in the OpenVoice directory
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
pip install whisper pynput pyaudio
"""
from openai import OpenAI
import time
@iddar
iddar / remove_quarantine.md
Last active September 17, 2022 05:59
[FIX] Remove all files in a folder no more can’t be opened because Apple cannot check it for malicious software.

Run follow command in a folder

find . -maxdepth 1 -perm -111 -type f | xargs -n 1 -I{} xattr -d com.apple.quarantine {}
@iddar
iddar / Calc_if.php
Last active August 17, 2022 21:43
Ejercicio
<?php
var_dump($_POST);
$total = 0;
if (isset($_POST['operador'])) {
$op = $_POST['operador'];
if ($op == "divi") {
$total = $_POST['izq'] / $_POST['derc'];
} elseif ($op == "suma") {
$total = $_POST['izq'] + $_POST['derc'];
} else {
const getNextVideo = () => {
setNextLoading(true)
for (let i = 0; i < lessons.length; i++) {
WatchedLessons.WatchedVideo(lessons[i].doc ?? '', user?.uid).then(res => {
if (res) {
setNext(lessons[i + 1])
}
})
setNextLoading(false)
}
@iddar
iddar / RAID_GUIDE.md
Created June 23, 2020 23:06
Setup fake Intel Raid on linux

Ultra basic setup

  • Install tooling apt install dmraid
  • Active raed with sudo dmraid -a y
  • use Disks for edit mount point and lebel

Tip

For clean df list use

@keyframes backInRight {
0% {
transform: translateX(400px) scale(1);
opacity: 0.7;
}
80% {
transform: translateX(0px) scale(1);
opacity: 0.7;
}
@iddar
iddar / flameshot.md
Last active April 9, 2020 18:24
flameshot config

If you need or want to replace the PrtScr shortcut do the following:

1.- Release the PrtScr binding by this command gsettings set org.gnome.settings-daemon.plugins.media-keys screenshot '[]'

2.- Go to Settings -> Devices -> Keyboard and scroll to the end. Press + and you will create custom shortcut.

3.- Enter name: "flameshot", command: /usr/bin/flameshot gui.

4.- Set shortcut to PrtScr (print).

@iddar
iddar / write_express_routes.js
Created August 29, 2019 13:53
export express routes
function getTrue(obj) {
return Object.keys(obj).filter(el => obj[el])
}
const fs = require('fs')
const stream = fs.createWriteStream("routes_file.txt")
stream.once('open', function(fd) {
api.stack.forEach(function(r){
@iddar
iddar / BallTracking.js
Created July 29, 2019 04:30
Ball tracking example with Node JS and OpenCV
// Ball tracking example with Node JS and OpenCV
// Before running this script please check de opencv4nodejs installation steps
// Dependencies: https://www.npmjs.com/package/opencv4nodejs
// Inspired by: https://www.pyimagesearch.com/2014/07/21/detecting-circles-images-using-opencv-hough-circles/
// Author Iddar Olivares <https://github.com/iddar> July 2019
const cv = require('opencv4nodejs');
const delay = 1
const devicePort = 0;