Skip to content

Instantly share code, notes, and snippets.

View jacksonfdam's full-sized avatar
💻
Coding...

Jackson F. de A. Mafra jacksonfdam

💻
Coding...
View GitHub Profile
// Screen Template
package ${PACKAGE_NAME}
import androidx.compose.runtime.Composable
import androidx.navigation.NavController
@Composable
fun ${NAME}Screen(
${NAME}State: ${NAME}UIState,
@jacksonfdam
jacksonfdam / index.html
Created May 16, 2022 09:05
Web RTC - Sound and Microphone Check
<main class="has-background-dark">
<div class="is-family-sans-serif has-text-white has-text-centered">
<h1 class="is-size-1 has-text-centered is-uppercase has-text-weight-bold">Sound check!</h1>
<p class="">See if your microphone and headphones are setup properly</p>
<p> For the Microphone test, a prompt will appear asking for permission to access your select output device </p>
<p>If you are not using headphones, it'll have a loop feedback</p>
<p></p>
<button class="button is-primary is-fullwidth is-large" id="micTest" type="button">Test Microphone</button>
<button class="button is-link is-light is-fullwidth is-medium" id="soundTest" type="button">Test Headphone/Speakers</button>
@jacksonfdam
jacksonfdam / whatsappweb.js
Created October 2, 2020 02:28
whatsappweb.js
/*
How to use it?
Open chrome, then visit web.whatsapp.com
Press F12, click at console
Copy the code bellow and paste into console.
Don't worry, you can trust me, I am a loveeeely person.
@jacksonfdam
jacksonfdam / .htaccess
Created May 28, 2020 03:58 — forked from morcegon/.htaccess
.htaccess optimized for laravel
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
Android developers resources
Getting started in Android development
Android developers
- official website https://developer.android.com/
- Codelabs https://codelabs.developers.google.com/
- Youtube https://www.youtube.com/user/androiddevelopers
Kotlin
@jacksonfdam
jacksonfdam / docker-setup.sh
Created August 16, 2018 11:54 — forked from alikon/docker-setup.sh
Docker & Docker Compose Ubuntu 17.10
#!/bin/bash
# docker
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu zesty stable"
/**
* We declare a package-level function main which returns Unit and takes
* an Array of strings as a parameter. Note that semicolons are optional.
*/
fun main(args: Array<String>) {
val funcaoDeSucesso = { nome:String ->
println(nome)
}
val funcaoDeFalha = { ->
@jacksonfdam
jacksonfdam / RunRunFullBoard.html
Created July 20, 2018 13:44
Bookmarklet - Para exibir a Board do RunRunIt em fullscreen sem as barras desnecessárias.
Acessar:
https://mrcoles.com/bookmarklet/
<a class="bookmarklet" href="javascript:(function()%7B(function%20()%20%7Bdocument.querySelector('.is-collapsed%3Anot(.off-canvas)%20.basic-page').style.paddingTop%20%3D%20'0px'%3Bdocument.querySelector('.is-collapsed%3Anot(.off-canvas)%20.basic-page').style.paddingLeft%20%3D%20'0px'%3Bdocument.querySelector('div.tabLayout-bodyWrapper').style.paddingTop%20%3D%20'0px'%3Bdocument.querySelector('div%5Bdata-region%3D%22header%22%5D').style.display%3D'none'%3Bdocument.querySelector('%23application-header').style.display%3D'none'%3Bdocument.querySelector('div.tabLayout-header').style.display%3D'none'%3Bdocument.querySelector('.sidemenu-container').style.display%3D'none'%3Bdocument.querySelector('div.tabLayout%20.tabLayout-bodyWrapper%20.cardsLayout').style.height%3D'100%25'%3Bvar%20elem%20%3D%20document.body%3Bvar%20requestMethod%20%3D%20elem.requestFullScreen%20%7C%7C%20elem.webkitRequestFullScreen%20%7C%7C%20elem.mozRequestFullScreen%20%7C%7C%20elem.msRequestFullScreen%3
@jacksonfdam
jacksonfdam / modos.js
Last active March 20, 2018 10:32
Baseado em uma resposta a uma questão que fiz no Yahoo! Respostas.
var moedas = [0.01, 0.05, 0.10, 0.25, 0.50, 1.00, 2.00, 5.00, 10.00, 20.00, 50.00, 100.00];
var valor = 4.10 ;
function modos(troco,maior_moeda){
if(maior_moeda < 0){
return 1;
}
var contador = 0;
while(troco >= 0 ){
contador = contador + modos(troco, maior_moeda -1);
troco = troco - moedas[maior_moeda];
@jacksonfdam
jacksonfdam / modos.js
Created March 20, 2018 10:29
Baseado em uma resposta a uma questão que fiz no Yahoo! Respostas.
var moedas = [0.01, 0.05, 0.10, 0.25, 0.50, 1.00, 2.00, 5.00, 10.00, 20.00, 50.00, 100.00];
var valor = 4.10 ;
function modos(troco,maior_moeda){
if(maior_moeda < 0){
return 1;
}
var contador = 0;
while(troco >= 0 ){
contador = contador + modos(troco, maior_moeda -1);
troco = troco - moedas[maior_moeda];