Skip to content

Instantly share code, notes, and snippets.

View ViniciusFM's full-sized avatar
😁

Vinícius F. Maciel ViniciusFM

😁
View GitHub Profile
@ViniciusFM
ViniciusFM / slide_counter.vb
Last active November 23, 2024 18:21
This is a macro for slide counting on powerpoint. This macro only counts the slides that contain a Slide Number Shape on its surface. Everytime you execute this macro, each Slide Number Shape will receive a value like "N/T" where N is the # of the slide and T is the total # of slides containing the shape.
Function GetSlideNumberShape(Sld As Slide) As Shape
' return a shape if a slide number shape exists in sld and nothing otherwise
Dim shp As Shape
For Each shp In Sld.Shapes
If InStr(1, shp.Name, "Slide Number", vbTextCompare) > 0 Then
Set GetSlideNumberShape = shp
End If
Next shp
End Function
@ViniciusFM
ViniciusFM / pyrtf2latex.py
Last active November 16, 2024 13:13
This code parses a RTF content from your clipboard to a simple LaTeX syntax
'''
pyrtf2latex.py
==============
This script was created to copy rich text from an office suite
application and adapt it for transferring text formatting, including
bold, italic, subscript, and superscript content. Additionally, it
highlights any text enclosed in parentheses (but maybe you won't need
this, feel free to modify). You are welcome to adapt this script for
your own needs, but please note that it is designed to work
@ViniciusFM
ViniciusFM / battery.py
Created October 29, 2024 14:11
Show battery status every 5 seconds in text mode. Just run the script and press CTRL+C to leave.
#!/usr/bin/env python3
import subprocess
import time
SLEEPTIME = 5
def format(output):
out = output.decode('utf-8').split('\n')
return out[0].split(': ', 1)[1]
@ViniciusFM
ViniciusFM / hello_kernelzera.asm
Last active June 16, 2023 02:28
Desafio de hello world da página Kernelzera do Instagram
; programa hello_kernelzera.asm
; compilar:
; $ nasm -f elf64 hello_kernelzera.asm
; $ ld hello_kernelzera.o -o hello.out
; executar:
; $ ./hello.out
global _start
section .text