Skip to content

Instantly share code, notes, and snippets.

View fellypsantos's full-sized avatar
🎯
Focusing

Fellyp Santos fellypsantos

🎯
Focusing
View GitHub Profile
@fellypsantos
fellypsantos / adb-screenshot.bat
Created September 29, 2022 12:45
Take a screenshot from phone connected over adb, and save it to desktop.
@echo off
REM Screenshots will be saved to save directory
REM where your script is running.
REM Generate filename as timestamp
set FILENAME=%DATE:/=-%@%TIME::=-%
set FILENAME=%FILENAME: =%
set FILENAME=%FILENAME:,=.%.png
@fellypsantos
fellypsantos / Tampermonkey-XHR-Intercept.js
Created March 21, 2022 18:18
Script to intercept XMLHttpRequest calls made by some page.
/* Intercept XMLHttpRequests */
(function(open) {
XMLHttpRequest.prototype.open = function() {
this.addEventListener("readystatechange", function() {
console.log("readyState: "+this.readyState);
}, false);
open.apply(this, arguments);
};
})(XMLHttpRequest.prototype.open);
@fellypsantos
fellypsantos / CadSUSWebNoExpire.user.js
Last active February 18, 2022 17:59
Script para desabilitar expiração de sessão do CadSUSWeb, assim o operador fica sempre logado aumentando a produtividade pois não terá de fazer logins demorados consantemente.
// ==UserScript==
// @name CADSUS Web - Sessão Ilimitada
// @namespace cadsusweb#fellypsantos2011@gmail.com
// @version 1.0
// @description Mantém sessão cadsusweb ativada até que o navegador seja fechado.
// @author fellypsantos2011@gmail.com
// @match https://cadastro.saude.gov.br/novocartao/restrito/usuarioConsulta.jsp*
// @match https://cadastro.saude.gov.br/novocartao/restrito/usuarioCadastro.jsp*
// @downloadURL https://gist.github.com/fellypsantos/c10515c430a8e1ac6ad7c19c17ed93e4/raw/68ad0c130b195aeedddfa674f8252214e67997aa/CadSUSWebNoExpire.user.js
// @updateURL https://gist.github.com/fellypsantos/c10515c430a8e1ac6ad7c19c17ed93e4/raw/68ad0c130b195aeedddfa674f8252214e67997aa/CadSUSWebNoExpire.user.js
@fellypsantos
fellypsantos / validar_cpf.php
Created October 21, 2021 14:59 — forked from rafael-neri/validar_cpf.php
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;
@echo off
setlocal enabledelayedexpansion
set folder[0]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Setup\MSIs\VSTA
set folder[1]=C:\Program Files\Corel\PASMUtility\v1
set folder[2]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Setup
set folder[3]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Programs64
set folder[4]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Filters64
set folder[5]=C:\Program Files\Corel\CorelDRAW Graphics Suite 2019\Connect64
@fellypsantos
fellypsantos / MacroConvertCodeToAddress.cs
Last active October 28, 2021 04:45
MacroRecorder c# to convert a street code to full address, number and neighborhood.
/**
Author: fellypsantos2011@gmail.com
Description: C# script to run as a macro inside Macro Recorder program.
It receives a code like "FL" and converts to full address
like "Francisco Lima" house number as default and neighborhood.
*/
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
@fellypsantos
fellypsantos / AndroidManifest.xml
Created June 5, 2020 03:15 — forked from erkattak/AndroidManifest.xml
Android Application Setup for use with Charles Proxy
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:networkSecurityConfig="@xml/network_security_config">
@fellypsantos
fellypsantos / open-cmder-here.md
Created May 6, 2020 04:27 — forked from hamzahamidi/open-cmder-here.md
"Open Cmder Here" in context menu

"Open Cmder Here" in context menu

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.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
    @="Open Cmder Here"
 "Icon"="\"%CMDER_ROOT%\\icons\\cmder.ico\",0"
@fellypsantos
fellypsantos / webpack.config.js
Created February 25, 2020 18:40
Webpack configuration file, excluding devDependencies from build.
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const package = require('./package.json');
module.exports = {
mode: 'production',
target: 'node',
entry: path.resolve(__dirname, 'index.js'),
output: {
path: path.resolve(__dirname, 'dist'),
@fellypsantos
fellypsantos / React Native (Android) - Rename applicationID, package name.md
Created November 10, 2019 06:17 — forked from markterence/React Native (Android) - Rename applicationID, package name.md
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.