Skip to content

Instantly share code, notes, and snippets.

View Leokuma's full-sized avatar

Leokuma

  • Brazil/Japan
View GitHub Profile
[Nemo Action]
#############################################
#### DEBUGGING:
####
#### Run Nemo in debug mode using with
### NEMO_DEBUG set to include 'Actions'
####
#### i.e. $ nemo --quit
#### $ NEMO_DEBUG=Actions nemo --debug
@Leokuma
Leokuma / launch.json
Created April 4, 2023 01:39
VS Code Deno Launch Settings
{
"version": "0.2.0",
"configurations": [
{
"request": "launch",
"name": "Launch",
"type": "node",
"program": "${workspaceFolder}/main.ts",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "deno",
@Leokuma
Leokuma / theme.ahk
Last active November 20, 2022 18:44
[AHK] Toggle dark mode (Win11)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon ; If you don't want a tray icon for this AutoHotkey program.
#SingleInstance force ; Skips the dialog box and replaces the old instance automatically
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir, %A_ScriptDir% ; Set default directory to where this script file is located. (Note %% because it's expecting and unquoted string)
NumpadUp::
RegRead, light, HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize, SystemUsesLightTheme
if light {
@Leokuma
Leokuma / SoundSet-Script.ahk
Last active April 4, 2023 01:48
[AHK] Mute/Unmute mic (Win11)
SetBatchLines -1
SplashTextOn,,, Gathering Soundcard Info...
; Most of the pure numbers below probably don't exist in any mixer, but they're queried for completeness.
; The numbers correspond to the following items (in order): CUSTOM, BOOLEANMETER, SIGNEDMETER, PEAKMETER,
; UNSIGNEDMETER, BOOLEAN, BUTTON, DECIBELS, SIGNED, UNSIGNED, PERCENT, SLIDER, FADER, SINGLESELECT, MUX,
; MULTIPLESELECT, MIXER, MICROTIME, MILLITIME
ControlTypes := "VOLUME,ONOFF,MUTE,MONO,LOUDNESS,STEREOENH,BASSBOOST,PAN,QSOUNDPAN,BASS,TREBLE,EQUALIZER,0x00000000, 0x10010000,0x10020000,0x10020001,0x10030000,0x20010000,0x21010000,0x30040000,0x30020000,0x30030000,0x30050000,0x40020000,0x50030000,0x70010000,0x70010001,0x71010000,0x71010001,0x60030000,0x61030000"
ComponentTypes := "MASTER,HEADPHONES,DIGITAL,LINE,MICROPHONE,SYNTH,CD,TELEPHONE,PCSPEAKER,WAVE,AUX,ANALOG,N/A"
@Leokuma
Leokuma / navigator.ahk
Last active June 25, 2023 16:41
AutoHotKey Navigator
#NoEnv ;Recommended for performance and compatibility with future AutoHotkey releases.
#NoTrayIcon ;if you don't want a tray icon for this AutoHotkey program.
#SingleInstance force ;Skips the dialog box and replaces the old instance automatically
SendMode Input ;Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir, %A_ScriptDir% ;Set default directory to where this script file is located. (Note %% because it's expecting and unquoted string)
NumpadLeft::^#Left
NumpadRight::^#Right
NumpadIns::#Tab
@Leokuma
Leokuma / README.md
Last active February 29, 2020 05:19
(RFC) Novo Gerador de Documentação em JS

Novo Gerador de Documentação JS

Motivação

Em termos de funcionalidade, o gerador de documentação que mais entrega o que se espera é o famoso JSDoc, que é basicamente uma cópia do Javadoc.

Entretanto, ele apresenta 2 problemas fundamentais: dificuldade de se customizar a documentação e poluição severa do código-fonte com comentários.

Exemplo de Javadoc
 /**
@Leokuma
Leokuma / seletor-pontos.mjs
Created November 17, 2019 22:20
Demo para o custom element seletor-pontos
export class SeletorPontos extends HTMLElement {
constructor() {
super();
this.attachShadow({mode: 'open'});
this._pontos;
this._observador = new MutationObserver(() => this.pontos = this.dataset.pontos);
this.init();
}
init() {
@Leokuma
Leokuma / flexbox-demo.htm
Created November 13, 2019 03:50
Flexbox Demo
<!DOCTYPE html>
<html lang="pt_BR">
<head>
<title>Flexbox Demo</title>
<meta charset="UTF-8"/>
<meta name="author" content="Flexbox demo">
<meta name="description" content="Flexbox demo">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
.container {
@Leokuma
Leokuma / promiseAnimation.htm
Last active October 29, 2019 22:13
Promises, transições e animações
<html>
<head>
<title>Promise e animações</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="https://fonts.googleapis.com/css?family=Montserrat&display=swap" rel="stylesheet"/>
</style>
</head>
<body style='margin: 0px; display: flex; flex-direction: column; justify-content: center; height: 100%; align-items: center; font-family: Montserrat, sans-serif;'>
<div id='divAnimada' style='transition: 2s; opacity: 1; font-size: 56px;'>OPACIDADE</div>
<div style="display: flex; flex-direction: column;">
@Leokuma
Leokuma / index.htm
Last active May 5, 2020 03:47
Corpo de uma página HTML bem feita
<!DOCTYPE html>
<html lang="pt_BR">
<head>
<title>Título</title>
<meta charset="UTF-8"/>
<meta name="author" content="Nome do site">
<meta name="description" content="Descrição do conteúdo da página">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> <!-- importante para responsividade em mobile -->
<meta name="keywords" content="palavra1,palavra2"> <!-- não é importante. Antigamente era usado por mecanismos de busca, porém já faz tempo que a busca é feita de uma maneira mais sofisticada e que não depende mais dessa tag -->
<!-- Coloque o favicon.ico na raiz -->