Skip to content

Instantly share code, notes, and snippets.

View bernardolm's full-sized avatar
🧘‍♂️

Bernardo Loureiro bernardolm

🧘‍♂️
View GitHub Profile
Hot Water Music ⣿⣿⣿⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 56 plays
Hermeto Pascoal ⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 33 plays
Limp Bizkit ⣿⣿⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 28 plays
Pense ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 17 plays
Tool ⣿⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀⣀ 14 plays
@bernardolm
bernardolm / gist:1a4ed5aadec8c268ff2be3c327030445
Last active April 14, 2024 17:03
D2 - Personal WishList
title:Personal WishList
description:
// Cold Denial ()
dimwishlist:item=1216130969&perks=
// ABHORRENT IMPERATIVE STRIDES
dimwishlist:item=3371366804&perks=
// Tarântula
@bernardolm
bernardolm / gist:23ff2a1333854da1d04729ec03aa9bbc
Created March 2, 2024 15:03
10 MUST USE WEAPONS For Solo Players In Season 23
title:10 MUST USE WEAPONS For Solo Players In Season 23
descripttion:Season of The Wish Best Weapons by Eternal - https://www.youtube.com/watch?v=FlCI47xGIss
// Dragon's Breath ()
dimwishlist:item=17096506&perks=1478423395,1996142143,2727957645,1067908860
// Zaouli's Bane (Harrowed) ()
dimwishlist:item=291092617&perks=
title:jpcd12 - 2023-06-22
description:https://youtu.be/EJLkdqAKgIA?si=rCmxgO-Dv3fkduML
// Raconteur (pve)
//notes: tags:pve
dimwishlist:item=45643573&perks=1583705720,124408337
dimwishlist:item=45643573&perks=1583705720,1171887445
dimwishlist:item=45643573&perks=1409206216,124408337
dimwishlist:item=45643573&perks=1409206216,1171887445
@bernardolm
bernardolm / a2dp
Created October 26, 2022 00:34 — forked from takeseem/a2dp
Fixing bluetooth headset problem in xubuntu 16.04.
#!/bin/bash
# headset mac
mac="00:1D:DF:67:0A:29"
profile="a2dp"
# Special Bluetooth controller
btMac=""
# connect|disconnect wait time
waitTime=5
macId="${mac//:/_}"
input=(73 foobar)
rg="^[+\-]{0,1}[0-9]+$"
for num in "${input[@]}"; do
(echo "${num//[^\-+0-9]/}" | grep -Eq $rg) \
&& echo "$num is a number" \
|| echo "$num is not a number";
nnum="-"$num
(echo "${nnum//[^\-+0-9]/}" | grep -Eq $rg) \
package main
import (
"encoding/json"
"fmt"
)
type amenity struct {
Category string `json:"category"`
Name string `json:"name"`
@bernardolm
bernardolm / workerpool.go
Last active August 12, 2020 23:19 — forked from alexrios/workerpool.go
Golang Worker Pool
package main
import (
"fmt"
"strconv"
"sync"
"time"
)
type Job struct {
@bernardolm
bernardolm / github-digest.py
Created September 16, 2019 23:14 — forked from yagotome/github-digest.py
Resumo do arquivo de logs do github, rode esse script com python3 e com o pandas instalado (pip install pandas)
import sys
import pandas as pd
def parse_line(line):
return list(map(lambda l: l.strip(), line.split('|')))
with open(sys.argv[1], 'r', encoding='utf8') as f:
lines = f.readlines()
[header, _, *rows] = lines
@bernardolm
bernardolm / unique elements in a slice
Created April 25, 2018 00:19 — forked from johnwesonga/unique elements in a slice
Go code that ensures elements in a slice are unique
package main
import "fmt"
func uniqueNonEmptyElementsOf(s []string) []string {
unique := make(map[string]bool, len(s))
us := make([]string, len(unique))
for _, elem := range s {
if len(elem) != 0 {
if !unique[elem] {