# generate index
bat performance_overview.md |
rg '^#' |
sd '#' ' -' |
sd -- '- ' ' ' |
sd '(\w+.)' '[$1]' |
sd '\]\[' '' |
sd '(\w) (\w)' '$1-$2' |
tr '[:upper:]' '[:lower:]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is licensed under the terms of the MIT license https://opensource.org/license/mit | |
| # Copyright (c) 2021-2025 Marat Reymers | |
| ## Golden config for golangci-lint v1.64.6 | |
| # | |
| # This is the best config for golangci-lint based on my experience and opinion. | |
| # It is very strict, but not extremely strict. | |
| # Feel free to adapt it to suit your needs. | |
| # If this config helps you, please consider keeping a link to this file (see the next comment). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| declare TRACE | |
| [[ "${TRACE}" == 1 ]] && set -o xtrace | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| set -o noclobber | |
| posts() { |
I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.
If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:
- The contents of
/etc/os-release, if it exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://rm-o.dev/blog/basic-set-operations-in-golang/ | |
| package main | |
| import ( | |
| "fmt" | |
| "math/bits" | |
| ) | |
| const ( | |
| sat uint8 = 1 << iota // (0b0000001) -> {sat} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://rm-o.netlify.app/blog/basic-set-operations-in-golang/ | |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| type ( | |
| SetItem interface{} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isFn = (fn) => fn && {}.toString.call(fn) === '[object Function]'; | |
| const groupBy = (key) => (xs) => | |
| xs.reduce((rv, x) => { | |
| (rv[x[key]] = rv[x[key]] || []).push(x); | |
| return rv; | |
| }, {}); | |
| const flow = (...fns) => fns.reduce((f, g) => (...args) => g(f(...args))); | |
| const zipObject = (props, values) => | |
| props.reduce((obj, prop, index) => ((obj[prop] = values[index]), obj), {}); | |
| const zip = (...arrays) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: gpl-3.0 | |
| height: 400 | |
| border: no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://medium.com/javascript-inside/safely-accessing-deeply-nested-values-in-javascript-99bf72a0855a | |
| const props = { | |
| user: { | |
| posts: [ | |
| { title: 'Foo', comments: ['Good one!', 'Interesting...'] }, | |
| { title: 'Bar', comments: ['Ok'] }, | |
| { title: 'Baz', comments: [] }, | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # inspirado em https://clojuredocs.org/clojure.core/get-in | |
| from functools import reduce | |
| from numbers import Number | |
| my_dict = { | |
| "username": "rodmoi", | |
| "profile": { | |
| "name": "Rodolfo Oliveira", | |
| "hobbies": ["programming", "chess"], |
NewerOlder