Skip to content

Instantly share code, notes, and snippets.

View ifraixedes's full-sized avatar
🌍

Ivan Fraixedes ifraixedes

🌍
View GitHub Profile

Trusted Client IP

This implementation was developed for Storj Labs and is part of some of their systems, however, it isn't at this time used, so they will likely remove it.

I've kept it in this gist for future reference.

Storj labs licensed this code under the GNU Affero General Public License v3.0.

This code was copied on 2022-06-30 from the repository hosted on

Failrate

This implementation was developed for Storj Labs and was part of some of their systems, however, it was removed at some point due to it wasn't needed anymore and I've kept it in this gist for future reference.

See doc.go file for more information about what this package provides.

@ifraixedes
ifraixedes / golang_html_unescape.go
Last active July 19, 2021 14:43
Inverse result of the json.HTMLEscape function present in the standard library
package main
// HTMLUnescape replace from src the sequence of bytes \u003c, \u003e, \u0026,
// \u2028, \u2029 by their representative characters <, >, &, U+2028, U+2029.
// Mostly it's does the reverse result of the HTMLEscape function present in
// encoding/json package of the standard library.
//
// The function receives a byte slice for avoiding string allocations during the
// replacement besides it modifies src and returns it.
func HTMLUnescape(src []byte) []byte {
@ifraixedes
ifraixedes / deletion-perfomance-1.0kb-file-trace.svg
Last active November 12, 2019 07:55
storj/docs/blueprints: Deletion performance
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am ifraixedes on github.
  • I am ifraixedes (https://keybase.io/ifraixedes) on keybase.
  • I have a public key ASClYCP0Qc1dyx-BI3pJi4N2TDIy-TEVxErkswhvm5RyJwo

To claim this, I am signing this object:

@ifraixedes
ifraixedes / _goang_postgres_uuid_benchmark.md
Last active April 25, 2023 22:50
Go PosgreSQL UUID as string and UUID (byte[16]) benchmark

This file exists to give to this gist a proper name.

@ifraixedes
ifraixedes / ..golang_bcn_intro_talk_pprof
Last active April 19, 2022 17:30
Golang Barcelona - Introductory talk about pprof, the official golang profiling tool
This file exists to give to this gist a proper name.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
(http://www.wtfpl.net/about/)
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@ifraixedes
ifraixedes / .babelrc
Last active November 24, 2016 19:39
Generators & Async function - Source files used for talks (meetups, etc)
{
"env": {
"development": {
"presets":["es2015-node5"],
"plugins": ["transform-async-to-generator"]
}
}
}
I used one of demos of Lovefield project (https://github.com/google/lovefield) as an inspiration.