Skip to content

Instantly share code, notes, and snippets.

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

Ruben Carrascal krrskl

🏠
Working from home
View GitHub Profile
@krrskl
krrskl / arc-test-midulive.js
Created June 29, 2022 14:19
This code base is a test make to midudev by recruiter from arc.dev
import assert from 'node:assert';
const firstLeftArray = [
{ id: 0, name: 'Miguel' },
{ id: 1, name: 'Justin' },
{ id: 3, name: 'Test' },
];
const firstRightArray = [
{ id: 0, email: 'miduga@gmail.com' },
{ id: 2, email: 'alpha@gmail.com' },
@krrskl
krrskl / Password confirm
Created June 3, 2021 23:32
Custom validator to password and password confirm using reactive forms
/utils/custom-validators.ts
export const confirmPasswords = (control: AbstractControl) => {
if (control.get('password').value !== control.get('confirmPassword').value) {
control.get('confirmPassword').setErrors({ passError: true });
return { passError: true };
}
return null;
};
@krrskl
krrskl / .prettierrc
Last active February 24, 2022 16:45
Prettier configurations
{
"printWidth": 80,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"semi": true,
"useTabs": false,
"proseWrap": "preserve",
@krrskl
krrskl / dyld-ibrary-not-loaded.MD
Last active July 7, 2020 21:27
How to solve the error of dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib

How to solve the error of dyld Library not loaded

brew uninstall --ignore-dependencies node icu4c
brew install node

Try running this command

@krrskl
krrskl / auto_unfollow.js
Last active May 25, 2020 18:40
Unfollow all users of a profile in Instagram
(() => {
let unfollowButtons = [];
const notUnFollowUsers = [];
const _getButtonsActions = () => document.querySelectorAll(".-nal3");
const _getUnfollowsButtons = () => [
...document.querySelectorAll(".sqdOP.L3NKy._8A5w5"),
];
const _confirmUnFollow = () => document.querySelector(".aOOlW.-Cab_").click();
const _getContainer = () => document.querySelector(".PZuss");
const _plusOrMinus = () => (Math.random() < 0.5 ? -1 : 1);
@krrskl
krrskl / auto_follow.js
Last active May 25, 2020 18:41
Follow users who have liked an Instagram post
(() => {
let followButtons = [];
const _getUsers = () =>
document.querySelector(".sqdOP.yWX7d._8A5w5[type='button']");
const _getFollowsButtons = () => [
...document.querySelectorAll(".sqdOP.L3NKy.y3zKF"),
];
const _getContainer = () =>
document.querySelector(".Igw0E.IwRSH.eGOV_.vwCYk.i0EQd").children[0];
@krrskl
krrskl / Twitter: Delete tweets
Created April 24, 2020 20:13
This code is for delete all the tweets of your profile
/**
* This code work in the https://mobile.twitter.com/YOUR_USERNAME/with_replies
*
*/
const _this = $;
const clickFirstElement = () => {
_this(
".css-18t94o4.css-1dbjc4n.r-1777fci.r-11cpok1.r-1ny4l3l.r-bztko3.r-lrvibr"
).click();
setTimeout(() => {