Skip to content

Instantly share code, notes, and snippets.

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

Fran Perez bran921007

🏠
Working from home
View GitHub Profile
@bran921007
bran921007 / spammer.js
Created March 11, 2023 18:55 — forked from StephanStanisic/spammer.js
Whatsapp spammer for tampermonkey: With GUI!
// ==UserScript==
// @name w8pp spammer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://web.whatsapp.com/
// @grant none
// ==/UserScript==
"use strict";function send(e){document.getElementsByClassName("pane-header pane-chat-header")[0].getElementsByClassName("emojitext ellipsify")[0].innerHTML==whitelist&&(document.getElementsByClassName("icon icon-smiley btn-emoji")[0].click(),document.getElementsByClassName("input")[1].innerHTML=e,document.getElementsByClassName("menu-item")[pagee].click(),document.getElementsByClassName("emojik emojiordered"+emoji)[0].click(),document.getElementsByClassName("icon btn-icon icon-send send-container")[0].click())}function addListeners(){document.getElementById("dyx").addEventListener("mousedown",mouseDown,!1),window.addEventListener("mouseup",mouseUp,!1)}function mouseUp(){window.removeEventListener("mousemove",divMove,!0)}function mouseDown(e){window.addE
@bran921007
bran921007 / pagedpopup.js
Created January 21, 2023 20:04 — forked from odoe/pagedpopup.js
A custom popup pager for multiple features for use with Leaflet.js.
/*jshint laxcomma:true*/
/**
* The following uses RxJS to handle the
* next/prev click event stream
* https://github.com/Reactive-Extensions/RxJS
* Could substitute with regular addEventListener
* if desired.
*
* It also uses font-awesome for next/prev icons

MS Office activation

Steps

  1. Download and install Office 365

  2. Remove current trial license

  3. Open command prompt as admin

  4. Navigate to the Office folder

@bran921007
bran921007 / morse.rb
Created March 19, 2022 05:46 — forked from trejo08/morse.rb
Morse Code translator written in Ruby as solution of CodementorX Assessment.
class Morse
def posibilities(signals)
signals.include?('?') ? check_wildcard(signals) : morses["#{signals}"]
end
def check_wildcard(signals)
length = signals.split('').length
values = []
if length.eql?(1)
values = ["E", "T"]
@bran921007
bran921007 / AppServiceProvider.php
Created February 16, 2022 06:09 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@bran921007
bran921007 / settings.json
Created January 23, 2022 00:46 — forked from aschmelyun/settings.json
VS Code Settings
{
"editor.codeLens": false,
"workbench.colorTheme": "Atom One Dark",
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
"editor.selectionHighlight": false,
"editor.highlightActiveIndentGuide": false,
@bran921007
bran921007 / gist:3ef0af3fea8e0f6ba7d4c7ca69375f52
Created July 19, 2021 23:31 — forked from davidhemphill/gist:5188894
How to do a Git clone without the .git directory
// Clone the repo
git clone --depth=1 git://someserver/somerepo dirformynewrepo
// Remove the .git directory
rm -rf !$/.git
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@bran921007
bran921007 / readDuration.php
Created May 5, 2021 19:18 — forked from owenvoke/readDuration.php
A string macro for the duration to read text.
<?php
// From Marcel Pociot's tweet
// See: https://twitter.com/marcelpociot/status/1389881758267625473
Str::macro('readDuration', function (... $text) {
$totalWords = str_word_count(implode(' ', $text));
$minutesToRead = round($totalWords / 200);
return (int) max(1, $minutesToRead);
@bran921007
bran921007 / csv_to_array.php
Created March 17, 2021 20:20 — forked from jaywilliams/csv_to_array.php
Convert a comma separated file into an associated array.
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Example:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array