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 / ProxyWebServiceGNRE.csharp
Created November 5, 2019 18:36
Classe que faz o proxy para o webservice do GNRE de consulta de config de UF
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
@MatheusMuriel
MatheusMuriel / App.vue
Created January 7, 2020 20:57
Resize div in VueJS without jQuery
<template>
<div id="app">
<div class="lateral-block"
:style="{width: widthLateral+'px'}">
<div class="lateral">
</div>
<div class="gutter-vertical" id="gutterVertical"></div>
</div>
@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;
@MatheusMuriel
MatheusMuriel / FindClassWindow.sh
Created April 24, 2020 13:21
Descobrir o nome da classe de uma janela no i3WM
xprop | grep -i 'class'
print("Hello World!")
for i in range(0, 5):
print("Ra!")
print("Bye Bye World!")
require 'sinatra'
require 'fileutils'
set :port, 6000
diretorio_repo = '/home/Muriel/JarvisBot/'
post '/jarvis' do
system('systemctl stop jarvisbot.service')
require 'sinatra'
require 'json'
require 'fileutils'
require 'logger'
set :port, 6000
diretorio_repo = '/home/Muriel/JarvisBot/'
caminho_logs = '/home/Muriel/Logs/post-reciver/'
@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
@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;
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