Skip to content

Instantly share code, notes, and snippets.

View mrocha98's full-sized avatar
🧐
Learning swift

Matheus Rocha mrocha98

🧐
Learning swift
View GitHub Profile
@mrocha98
mrocha98 / apt_update_alias.md
Last active January 8, 2021 17:03
Small script to update apt stuff in a pretty and informative way

Pretty Apt Update for ZSH

Update your apt stuff in a pretty and informative way

Instructions

Put this code in your .zsh file:

update_stuff() {
@mrocha98
mrocha98 / settings.json
Created January 13, 2021 14:41
vscode configs
{
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"editor.fontFamily": "JetBrains Mono",
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.rulers": [80, 120],
"editor.tabSize": 2,
"editor.minimap.enabled": false,
@mrocha98
mrocha98 / remove-spaces.js
Created April 12, 2021 15:07
A Node.js script that remove spaces from filenames and replace for dashes
const path = require('path')
const { promises: fs } = require('fs')
const DIR = '.'
const spacesRegex = /\s/g
;(async () => {
try {
const files = await fs.readdir(DIR)
@mrocha98
mrocha98 / fake-request.js
Created September 23, 2021 13:59
a dummy JS Promise to simulate a request
const fakeRequest = (response = {}, delay = 1000) =>
new Promise((resolve) => setTimeout(() => resolve(response), delay))
Dart 25 hrs 53 mins ██████████████████▊░░ 89.5%
JavaScript 2 hrs 18 mins █▋░░░░░░░░░░░░░░░░░░░ 8.0%
HTML 24 mins ▎░░░░░░░░░░░░░░░░░░░░ 1.4%
Other 14 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.8%
TypeScript 2 mins ░░░░░░░░░░░░░░░░░░░░░ 0.1%
@mrocha98
mrocha98 / main.dart
Created November 29, 2023 14:29
xablau mostRecentCompleted
class Xablau {
const Xablau(this.id, [this.completedAt]);
final int id;
final DateTime? completedAt;
@override
String toString() => 'Xablau($id, $completedAt)';
}