Skip to content

Instantly share code, notes, and snippets.

View mauro-balades's full-sized avatar
😪
Focusing

mr. m 🤙 mauro-balades

😪
Focusing
View GitHub Profile
#unified-extensions-view {
--uei-icon-size: 16px;
.unified-extensions-item {
margin-block: 0 !important;
border-radius: var(--arrowpanel-menuitem-border-radius) !important;
> .unified-extensions-item-action-button {
.unified-extensions-item-message-deck {
display: none;
@mauro-balades
mauro-balades / plfm.md
Created February 18, 2024 21:17
The perfect programming language (for me)

Welcome

The quest for the perfect programming language is a personal and subjective journey, as the most suitable language can vary widely depending on an individual's needs, preferences, and the context of the task at hand. No single programming language can claim to be universally perfect, but there is often one that aligns closely with a specific developer's requirements, providing the right balance of power, expressiveness, and ease of use.

Here's what I would love to have in a perfect programming language:

  • Static typing
  • Compiled and low-level (I need speed)
  • High-level constructs (combined with point #2)
  • Exception-based Error Handling
@mauro-balades
mauro-balades / nice.py
Last active September 5, 2023 13:25
Nice python turtle shape
import turtle as sneaky_turtle
sneaky_turtle.speed(0)
i = 120/2
while True:
for i in range(6):
sneaky_turtle.forward(100)
sneaky_turtle.left(360/6)
sneaky_turtle.left(i/2)
i *= 2
@mauro-balades
mauro-balades / a.c
Last active June 11, 2023 10:47
beauty-of-c
#include __FILE__
pleaseKillMe;
@mauro-balades
mauro-balades / format.sh
Last active March 6, 2023 16:23
Format your C++ projects
# note (1): remember to change the ".cpp" to the extension (and the path) you want formatted
# note (2): this works with header files too
find src/**/*.cpp | xargs clang-format -i -style="{IndentWidth: 4,TabWidth: 4}"
@mauro-balades
mauro-balades / main.c
Last active February 26, 2023 11:19
Represent a number with value "1"
#include <stdio.h>
int main() {
int num=++*(*(unsigned int(*)[1])(unsigned int[]){0}+!(*(unsigned char*)(&((unsigned int*)0)[1])))<<((!(sizeof(int)%2))?16:0);
printf("num is now %d",num);
return 0;
}
@mauro-balades
mauro-balades / __main__.py
Last active May 14, 2023 07:05
Create infinite accounts with logbug
from selenium import webdriver
import undetected_chromedriver as uc
import random
import string
import csv
from time import sleep
def id_generator(size=50, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
@mauro-balades
mauro-balades / index.md
Last active January 17, 2023 11:18
Why machinarium is great

Introduction

Machinarium is a point ‘n’ click adventure game that obligate players to use logic in order to proceed with the story. It takes around 3-4 hours (that's what it took me to complet it) and those 3 hours where filled with amazing discoveries. The game allows the player to discover more about the main character (commonly known as "Josef" by the community) and how he got in he's current situation.

Josef does not want to conquer the world, he just wants to reclaim his original state and have a good life with his girlfriend. For him to achieve him his goals, he must help other first and the ones he helped would return the favour. Machinarium is a good example of games that wants to transmit a message to it's player base and also about how a game can use some techniques to make it feel more inmersive and atrackt the user into wanting to discover more about the story.

Machinarium was published on 2009 along with other games such as call of duty. This made it difficult for it to expand on it's

@RobertAKARobin
RobertAKARobin / safari.md
Last active July 8, 2024 11:29
Safari's date-picker is the cause of 1/3 of our customer support issues

Safari's date-picker is the cause of 1/3 of our customer support issues

...and obviously we're building a workaround. But I'm absolutely flabbergasted that a standard <input type="date"> HTML field, in a standard browser, from a company that bases its reputation good design, could be so dreadful.

The context

I'm the developer for a startup that sells a genetic test to recommend medications for high blood pressure. For medical reasons we need to know our customers' birth date. Most of our customers are in their 60s or older. We've found that many of them use iPads or iPhones. And they're the ones who complain to our customer support that our site is unusable.

The problem

@mauro-balades
mauro-balades / safe_code.hpp
Last active June 21, 2024 19:44
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This is an "extension" for https://gist.github.com/aras-p/6224951
#define ; ; // not a semi colon >:)
#define union struct
#define true (2 & 3 == 2)