Skip to content

Instantly share code, notes, and snippets.

View marcelloinfoweb's full-sized avatar

< Marcelo Caetano /> marcelloinfoweb

View GitHub Profile
@marcelloinfoweb
marcelloinfoweb / cpfCnpj.validate.js
Last active March 12, 2024 13:22
Validar CPF e CNPJ com Jquery e ValidateJS
function isCnpj(cnpj) {
var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais;
if (cnpj.length === 0) {
return false;
}
cnpj = cnpj.replace(/\D+/g, '');
digitos_iguais = 1;
for (i = 0; i < cnpj.length - 1; i++)
if (cnpj.charAt(i) !== cnpj.charAt(i + 1)) {
digitos_iguais = 0;
@marcelloinfoweb
marcelloinfoweb / install-vscode.sh
Created July 24, 2020 13:26
Install vscode on Clear Linux
#!/bin/bash
# https://openwebcraft.com/notes/clearlinux-desktop-setup/
echo "--- start"
wget https://vscode-update.azurewebsites.net/latest/linux-x64/stable -O code_latest_amd64.tar.gz
SRC_FILE=code_latest_amd64.tar.gz
DEST=/opt/code
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
def verificar_argumentos():
"""
Verifica se todos os argumentos necessários foram fornecidos.
"""
if len(sys.argv) != 4:
@marcelloinfoweb
marcelloinfoweb / readme.md
Created June 30, 2023 12:03 — forked from ihabhamad/readme.md
Jetbrains IntelliJ Activation Code

For Subsciption until January 10, 2020

CATF44LT7C-eyJsaWNlbnNlSWQiOiJDQVRGNDRMVDdDIiwibGljZW5zZWVOYW1lIjoiVmxhZGlzbGF2IEtvdmFsZW5rbyIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDIwLTAxLTA4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjAtMDEtMDgifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMC0wMS0wOCJ9LHsiY29kZSI6I

{
"version": "1.9.0"
}
@marcelloinfoweb
marcelloinfoweb / update_blacklist_to_unbound.sh
Created October 9, 2021 16:11
O script baixa as listas, ordena os links, deixa links únicos e salva no arquivo para o padrão do formato do Unbound.
#!/bin/sh
## Clean up any stale tempfile
echo "Removing old files..."
[ -f /tmp/hosts.working ] && rm -f /tmp/hosts.working
## Awk regex to be inverse-matched as whitelist
# - SolveMedia is needed for captchas on some websites
whitelist='/(api.solvemedia.com)/'
@marcelloinfoweb
marcelloinfoweb / menuFixo.html
Created November 4, 2014 02:11
Fixar Menu no topo.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<script src="jquery-1.11.1.min.js"></script>
<style>
body {

Clover Boot Flags

Flag Description
-v Verbose Mode
-x Safe Mode
-s Single User Mode
-no-zp Zone Postponing (use if hanging)
cpus=1 Single CPU Core Mode
-f No Kext Cache Mode (use if hanging)
@marcelloinfoweb
marcelloinfoweb / year-directive.js
Created April 22, 2020 20:22 — forked from mohsinrasool/year-directive.js
An AngularJS directive to create a dropdown of years
/**
* Usage: <year-select offset=0 range=10 />
*
*/
app.directive('yearSelect',function(){
var currentYear = new Date().getFullYear();
return {
restrict: 'AE',
replace: true,
@marcelloinfoweb
marcelloinfoweb / gist:cf8d8d3eaad24f1356f5258f8e37a41e
Created July 10, 2018 18:08
Fix Kernel panic by Apple Intel CPU Power Management kext
Running Mac OS X in PC is Tricky and a little bit hard but professionals always find out a way
This article is about fixing a common issue in Hackintosh computers, Kernel panic by Apple Intel CPU Power Management kext (Specially in AMD Machines)
This kext is specially designed to work with apple computers to manage the power (The name says it all)
but in Hackintosh its a real problem.
Kernel-Panic-Example-Picture
NullCpuPowermanagement or disabler kext can be used to bypass the kernel panic but they don’t work always as expected
Sometimes you may see the following kernel panic message:
“panic(cpu 0 caller 0xffffff7f82018cc9) : No HPETs available…CPU(s) configured incorrectly”