Skip to content

Instantly share code, notes, and snippets.

View wezoalves's full-sized avatar
🛌
programming lying down like Jovem Tranquilão

Weslley Alves wezoalves

🛌
programming lying down like Jovem Tranquilão
View GitHub Profile
@wezoalves
wezoalves / InstallAppsDev.sh
Last active January 24, 2024 19:24
Install on Fedora39: httpd php python nodejs mysql-server mongodb redis nginx
#!/bin/bash
# Função para verificar se o pacote está instalado
is_package_installed() {
rpm -q "$1" &> /dev/null
}
# Função para exibir mensagem de sucesso
success_message() {
echo -e "\e[32m✔ $1 instalado com sucesso.\e[0m"
@wezoalves
wezoalves / InstallAppsDesktop.sh
Last active January 24, 2024 18:02
Fedora 39 - Softwares Flat Hub
#!/bin/bash
#update: 2024-01-10
# Adicionar o repositório Flathub se ainda não estiver adicionado
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Lista de aplicativos a serem instalados
apps_to_install=(
"com.visualstudio.code"
@wezoalves
wezoalves / tailwind.navigation.html
Created August 29, 2023 19:05
navigation tailwind html
<header class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-4 py-12 mb-0 pb-0">
<div class="container mx-auto">
<nav>
<div class="sm:hidden relative w-11/12 mx-auto bg-white rounded">
<div class="absolute inset-0 m-auto mr-4 z-0 w-6 h-6">
<svg xmlns="http://www.w3.org/2000/svg" class="dark:stroke-zinc-950 stroke-gray-50" width="24" height="24" viewBox="0 0 24 24" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" />
<polyline points="8 9 12 5 16 9" />
<polyline points="16 15 12 19 8 15" />
</svg>
@wezoalves
wezoalves / youtube-feeds.md
Created October 1, 2017 01:34 — forked from tracend/youtube-feeds.md
Youtube Feeds
https://www.youtube.com/feeds/videos.xml?channel_id=CHANNELID
https://www.youtube.com/feeds/videos.xml?user=USERNAME
https://www.youtube.com/feeds/videos.xml?playlist_id=PLAYLISTID

Notes:

You can get the channel id by searching for the attribute data-channel-external-id in the source code of the youtube page

<script type="text/javascript" src="js/bootstrap-datepicker.js"></script>
<div id="datepicker"></div>
<script type="text/javascript">
$('#datepicker').datepicker().on('changeDate', function(ev){
var element = angular.element($('#datepicker'));
var controller = element.controller();
var scope = element.scope();
scope.$apply(function(){
/*-----------------------------------------------------------------*
| CalculaDigitoMod11(Dado, NumDig, LimMult) |
| Retorna o(s) NumDig Dígitos de Controle Módulo 11 do |
| Dado, limitando o Valor de Multiplicação em LimMult: |
| |
| Números Comuns:: iDigSaida iCod |
| CGC 2 9 |
| CPF 2 12 |
| C/C,Age - CAIXA 1 9 |
| habitação/bloqueto 1 9 |
@wezoalves
wezoalves / Calendar.java
Last active December 14, 2015 08:49
JAVA - Calendar
// get times
Calendar now = Calendar.getInstance();
int year = now.get(Calendar.YEAR);
int month = now.get(Calendar.MONTH); // Note: zero based!
int day = now.get(Calendar.DAY_OF_MONTH);
int hour = now.get(Calendar.HOUR_OF_DAY);
int minute = now.get(Calendar.MINUTE);
int second = now.get(Calendar.SECOND);
int millis = now.get(Calendar.MILLISECOND);
@wezoalves
wezoalves / ClickHeat.js
Created January 11, 2013 20:32
save positions clicks into page
var collectionsClicks = new Array();
var observerClicks = function(event) {
var info = new Object();
info.position = {};
info.position.click_x = event.x;
info.position.click_y = event.y;
info.position.screenX = event.screenX;
@wezoalves
wezoalves / browsing.js
Last active October 13, 2015 20:29
navigation url hash
/**
* Author: Weslley Alves <weslley.tec@gmail.com>
* Author URI: http://wezo.com.br
* Version: 0.0.1
* License: GNU General Public License
* License URI: http://www.wezo.com.br/blog/license/gnu-general-public-license/
*
* Examples:
* <script type="text/javascript">
*
@wezoalves
wezoalves / utils.js
Created November 27, 2012 18:19
return digit mod 10 based on a number
/**
* Author: Weslley Alves <weslley.tec@gmail.com>
* Author URI: http://wezo.com.br
* Version: 0.0.1
* License: GNU General Public License
* License URI: http://www.wezo.com.br/blog/license/gnu-general-public-license/
*
* Examples:
* <script type="text/javascript">
*