Skip to content

Instantly share code, notes, and snippets.

View fellypsantos's full-sized avatar
🎯
Focusing

Fellyp Santos fellypsantos

🎯
Focusing
View GitHub Profile
@sergeyzenchenko
sergeyzenchenko / russia-ddos.md
Last active April 16, 2024 15:32
Russia DDOS list
@gundamew
gundamew / FooLogger.php
Last active April 26, 2022 19:31
Custom Logger for Laravel 5.6. Send messages to Telegram.
<?php
namespace App\Logging;
use DateTimeZone;
use Monolog\Logger;
use App\Logging\TelegramBotHandler;
use Monolog\Formatter\LineFormatter;
class FooLogger
@hamzahamidi
hamzahamidi / open-cmder-here.md
Last active February 23, 2024 01:30
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

Edit 04/2021:

As of the lastest versions, just execute the following command .\cmder.exe /REGISTER ALL per Documentation.

Original Solution

To add an entry in the Windows Explorer context menu to open Cmder in a specific directory, paste this into a OpenCmderHere.reg file and double-click to install it.

@eacmen
eacmen / tplink-unauth-exploit.py
Created July 20, 2018 01:49
TP-LINK WL-WA850RE POC Unauthenticated Exploit
@markterence
markterence / React Native (Android) - Rename applicationID, package name.md
Created April 30, 2018 10:37
React Native (Android) - [ Changing application package name/bundle identifier ]

React Native (Android) - [ Changing application package name/bundle identifier ]

List of files to edit to change/rename your react-native android project. The following constants are used in the files to denote what kind of value should be placed.

  • APPLICATION_NAME - this will be used by react-native to identify your application. (settings.gradle, MainActivity.java, etc.)
  • APPLICATION_DISPLAY_NAME - display name in Android Home Screen.
  • ANDROID_PACKAGE_NAME - A valid android package name.
@mayank-shekhar
mayank-shekhar / Rename Package Name in React Native
Created February 16, 2018 07:28
Rename App ID and Package name for a React Native App.
For Android:
Manually change it in android/app/src/main/java/com/PROJECT_NAME/MainActivity.java:
package MY.APP.ID;
In android/app/src/main/java/com/PROJECT_NAME/MainApplication.java:
package MY.APP.ID;
In android/app/src/main/AndroidManifest.xml:
package="MY.APP.ID"
@rafael-neri
rafael-neri / validar_cpf.php
Last active April 27, 2024 21:49
Validar CPF em PHP (Completo)
<?php
function validaCPF($cpf) {
// Extrai somente os números
$cpf = preg_replace( '/[^0-9]/is', '', $cpf );
// Verifica se foi informado todos os digitos corretamente
if (strlen($cpf) != 11) {
return false;
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 26, 2024 01:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@flyingluscas
flyingluscas / UsingFakerInPT-BR.md
Last active April 18, 2024 11:12
Utilizando Faker em pt-BR

Utilizando Faker em pt-BR

Acesse o seu arquivo app/Providers/AppServiceProvider.php, e no método register adicione o seguinte :

/**
 * Register any application services.
 *
 * @return void
 */
@alexbruno
alexbruno / valid.cnpj.ts
Last active April 23, 2024 13:02
Validação de CNPJ
// Regex para validação de string no formato CNPJ
export const regexCNPJ = /^\d{2}.\d{3}.\d{3}\/\d{4}-\d{2}$/
// Método de validação
// Referência: https://pt.wikipedia.org/wiki/Cadastro_Nacional_da_Pessoa_Jur%C3%ADdica
export function validCNPJ(value: string | number | number[] = '') {
if (!value) return false
// Aceita receber o valor como string, número ou array com todos os dígitos
const isString = typeof value === 'string'