Skip to content

Instantly share code, notes, and snippets.

View misabitencourt's full-sized avatar
🏠
Working from home

ms_bit misabitencourt

🏠
Working from home
  • Custo misa
  • Florianópolis, Brazil
View GitHub Profile
@misabitencourt
misabitencourt / dark-colors.txt
Created November 5, 2024 12:16
Alternative colors for pure black
Charcoal Gray | Hex #121212
Dark Slate Gray | Hex: #191919
Outer Space | Hex: #252525
Rich Black | Hex: #0A0A0A
Coffee Bean | Hex: #1B1B1B
Dark Gray | Hex: #212427
Oil Black | Hex: #0C0C0C
Obsidian | Hex: #0B1215
Ebony | Hex: #222428
Black Chocolate | Hex: #100D08
@misabitencourt
misabitencourt / start.vbs
Created June 18, 2024 17:46
Start windows background process
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\path\to\your\batchfile.bat" & Chr(34), 0
Set WshShell = Nothing
@misabitencourt
misabitencourt / knex-sqlite3-repository.ts
Last active May 20, 2024 15:04
Typescript Bun Knex Sqlite3 Repository Start
import knex from "knex";
import fs from 'fs';
if (!fs.existsSync('./local.db')) {
fs.appendFileSync('./local.db', '');
}
export const localDb = knex({
client: 'sqlite3',
connection: {
@misabitencourt
misabitencourt / gist:2bd17b33cc2de3e3f4368f7169e34804
Last active July 10, 2023 17:22
Javascript simple properties/env parser
const content = `
PROPERTY=value
Property2=value2
`;
const config = (content + '').split('\n').map(line => {
line = line.trim();
if (line.indexOf('#') === 0) {
return '';
}
@misabitencourt
misabitencourt / normalizing_chars_sample.cpp
Created November 1, 2022 14:13
Remove special characters from String on C++
#include <iostream>
#include <string>
#include <bits/stdc++.h>
std::string normalizeString(const std::string &input)
{
std::string output = "";
std::string validChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZáãàâéêẽèíìîóôòõúù!@#$%^&*()_|+,.<>{}[]\\/-=?;:'\" \n";
std::string validUpper = "" + validChars;
transform(validUpper.begin(), validUpper.end(), validUpper.begin(), ::toupper);
@misabitencourt
misabitencourt / hello.js
Created September 8, 2018 21:18
A simple gist file
console.log('Hello world!');
@misabitencourt
misabitencourt / hello.js
Created September 8, 2018 21:09
A simple gist file
console.log('Hello world!');
@misabitencourt
misabitencourt / hello.js
Created September 8, 2018 21:04
A simple gist file
console.log('Hello world!');
@misabitencourt
misabitencourt / hello.js
Created September 8, 2018 21:02
A simple gist file
console.log('Hello world!');
@misabitencourt
misabitencourt / hello.js
Created September 8, 2018 21:00
A simple gist file
console.log('Hello world!');