Skip to content

Instantly share code, notes, and snippets.

Avatar
🤓
Being a Nerd...

Uilque Messias uqmessias

🤓
Being a Nerd...
View GitHub Profile
@uqmessias
uqmessias / toCurrency.js
Created Oct 7, 2022
Format number to currency format
View toCurrency.js
const toCurrency = num => num.toFixed(2).replace('.', ',').replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1.");
@uqmessias
uqmessias / base64.js
Created Dec 21, 2021
Function to transform string into base64
View base64.js
/**
*
* @param {string} str
*/
function base64(str) {
const base64Characters = [
"A",
"B",
"C",
"D",
@uqmessias
uqmessias / ffmpeg.md
Created Apr 13, 2020 — forked from protrolium/ffmpeg.md
using ffmpeg to extract audio from video files
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

@uqmessias
uqmessias / dec2hex.ts
Last active Feb 1, 2020
Converts an input parameter from Decimal to Hexadecimal
View dec2hex.ts
/**
* If you want to use it, you first need to install
* Deno at https://deno.land and run:
* deno https://gist.github.com/uqmessias/66f3de0da2f60419b39f26ca243f3e2a/raw 222
*/
function throwError(wrongArgument = null) {
const argumentError =
wrongArgument === null
? ""
: `"${wrongArgument}" is not a valid argument!\n\n`;
View deno-sample.ts
import { serve } from "https://deno.land/std@v0.30.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
req.respond({ body: "Hello World\n" });
}
View bradesco-dental-codigos-eventos.md
Código do Evento Descrição do Evento
00.000.001 Adequação de Meio
00.000.008 Consulta de Especialista em Estomatologia
00.000.009 Consulta de Especialista em Periodontia
00.000.010 Consulta de Especialista em Prótese
00.000.014 Estudo e Planejamento Ortodôntico
00.000.017 Manutenção Periodontal
00.000.025 Técnica de Localização radiográfica
00.000.028 Remoção de corpo estranho no seio maxilar
@uqmessias
uqmessias / countries-names-and-flags-in-portuguese-brazil-pt-br.md
Last active Jul 4, 2019
The list of all (or almost all) countries with their names and flag codes in brazilian portuguese (pt-br) and english — Lista de todos (ou quase todos) os países com seus nome e códigos de bandeiras em português brasileiro (pt-br) e inglês.
View countries-names-and-flags-in-portuguese-brazil-pt-br.md
var countriesInPortugueseBR = [
    {
      flag: 'af',
      nameEn: 'Afghanistan',
      namePt: 'Afeganistão',
    },
    {
      flag: 'za',
@uqmessias
uqmessias / regex-tutorial.md
Created May 15, 2019
Basic Regex tutorial for designers :)
@uqmessias
uqmessias / cv-uilque-messias-english.md
Last active Jan 10, 2019
My resumé written in english and on markdown format
View cv-uilque-messias-english.md

Uilque Messias Oliveira da Cruz

Summary

I'm a self-taught and highly motivated professional developer who work on the technology industry since 2010. I have advanced knowledge with Microsoft technologies and Android stack. I consider myself a fast learner with a great computer programming and logic skills.

I've been working in mobile stack since 2012 when I gained several prizes for developing some apps for Windows Phone and since then, I started to study more about Android and its technologies.

Professional experience

@uqmessias
uqmessias / android_screen_capture.sh
Created Sep 11, 2018 — forked from Ider/android_screen_capture.sh
Capture or record android screen, pull file to Mac when it's completed
View android_screen_capture.sh
# Demo: https://www.youtube.com/watch?v=4GsUf5OQAlI
# capture screen of android device
andrdroidScreenCapture() {
curTime=`date +%Y-%m-%d-%H-%M-%S`
tmpeName="$curTime.png"
[[ -n $1 ]] && fileName=$1 || fileName=$tmpeName
devicePath="/sdcard/$tmpeName"
adb shell screencap -p $devicePath
adb pull $devicePath $fileName