Skip to content

Instantly share code, notes, and snippets.

View MatheusMuriel's full-sized avatar

Matheus Muriel MatheusMuriel

  • Londrina, PR, Brazil
View GitHub Profile
@MatheusMuriel
MatheusMuriel / screenlock_script.sh
Created December 11, 2022 00:57
My screenlock script with glitch effect to i3wm
#/bin/sh
# Glichting screen lock script by xzvf
pngfile="/tmp/sclock.png"
bmpfile="/tmp/sclock.bmp"
glitchedfile="/tmp/sclock_g.bmp"
scrot -z $pngfile
# convert to bmp and pixelate
@MatheusMuriel
MatheusMuriel / anoteixon.udl
Created September 29, 2022 14:58
Notepad++ User Defined Language para anotações
<!--// Created by Matheus Muriel (https://github.com/MatheusMuriel) //-->
<NotepadPlus>
<UserLang name="Anoteixon Test" ext="txt atxt" darkModeTheme="yes" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="yes" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00// 01 02((EOL)) 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
def metodo
variavel = 50
hash = {a: 1, b: 2, c: 3}
lista = [1, 2, 3, 4, 5]
interpolacao = "String #{variavel}"
interpolacao.reverse
lista.each{|n| puts n}
end
@MatheusMuriel
MatheusMuriel / modalBookmarklet.js
Created November 4, 2020 16:52
Bookmarklet code for open a modal
javascript:(function(){
let tailwind = document.createElement('link');
tailwind.href = 'https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css';
tailwind.rel = 'stylesheet';
document.body.appendChild(tailwind);
let style = document.createElement('style');
style.appendChild( document.createTextNode(`
.modal {
opacity: 0;
@MatheusMuriel
MatheusMuriel / cafeina.bat
Last active October 28, 2020 14:59
Batch script para o computador não entrar em modo de espera
@if (@CodeSection == @Batch) @then
@echo off
rem Use [%SendKeys% "argument"] to send keys to the keyboard buffer
rem "%~F0" is complete path of this script
set SendKeys=CScript //nologo //E:JScript "%~F0"
:START_OF_LOOP
timeout 10 > NUL
require 'sinatra'
require 'json'
require 'fileutils'
require 'logger'
set :port, 6000
diretorio_repo = '/home/Muriel/JarvisBot/'
caminho_logs = '/home/Muriel/Logs/post-reciver/'
require 'sinatra'
require 'fileutils'
set :port, 6000
diretorio_repo = '/home/Muriel/JarvisBot/'
post '/jarvis' do
system('systemctl stop jarvisbot.service')
print("Hello World!")
for i in range(0, 5):
print("Ra!")
print("Bye Bye World!")
@MatheusMuriel
MatheusMuriel / FindClassWindow.sh
Created April 24, 2020 13:21
Descobrir o nome da classe de uma janela no i3WM
xprop | grep -i 'class'
@MatheusMuriel
MatheusMuriel / autoScroll.js
Created April 13, 2020 14:23
Scroll até o limite máximo da pagina
// Scroll para o fim da pagina
// Esse script é feito para scrollar até o fim de paginas com loading
// Eu o programei para ir até o final da pagina do instagram web
// mas creio que possa ser usado em diversos cenarios por isso estou compartilhando
// Caso ele pare antes de chegar ao final tente aumentar o tempo do sleep na linha 12
const sleep = (ms) => { return new Promise(resolve => setTimeout(resolve, ms)) }
var isEndOfPage = false;
while (!isEndOfPage) {
let heightBegin = document.body.scrollHeight;