Skip to content

Instantly share code, notes, and snippets.

View tscolari's full-sized avatar

Tiago Scolari tscolari

View GitHub Profile
@tscolari
tscolari / README.md
Last active April 27, 2020 09:45
S3 Upload GOLANG different behaviours

It seems that if you use a file reader as the reader of the request (even if you wrap it into another object), golang's request to S3 will always end with a 501 Not Implemented error response. If you load the same file in memory (e.g. a buffer) this doesn't happen and it works.

go run main.go buffer ./test-file <some presigned string>
works
#!/bin/bash -l
set -x

Keybase proof

I hereby claim:

  • I am tscolari on github.
  • I am tscolari (https://keybase.io/tscolari) on keybase.
  • I have a public key ASCPk16ZmFHhOXCsairlvFGm41u4ofUox8XpKo0XYa4QuQo

To claim this, I am signing this object:

system_domain:
consul_agent:
certificate:
private_key:
ca:
consul_encrypt_key:
consul_server:
certificate:
private_key:
loggregator_tls_metron:
@tscolari
tscolari / check_bit.go
Created July 12, 2016 15:06
sample to check if the `n` bit of a `a` byte is true or false
package main
import (
"fmt"
)
func main() {
var a byte
a = 0x02
fmt.Printf("%08b\n", a)
# Ring the bell if any background window rang a bell
set -g bell-action any
bind-key ^D detach-client
# Create splits and vertical splits
bind-key v split-window -h
bind-key ^V split-window -h
bind-key s split-window
bind-key ^S split-window
@tscolari
tscolari / flaky_tests.md
Created June 2, 2016 15:43
FLAKY CATs:
  • emits crash events and reports as 'crashed' after enough crashes -> apps/crashing_test.go:49
@tscolari
tscolari / hyperkube
Last active August 29, 2015 14:20
kubernetes 0.16.0
binaries
{"assets":{"price_per_week.js":"price_per_week-8b9f7aaab66b3f82f1c325bf249b3e73.js","maps/tuscany_map.js":"maps/tuscany_map-8c6d4b3ae9170f529cf6b55f76b383b3.js","jquery.tooltip.js":"jquery.tooltip-6141ab6d271d8fa94d75765e63f90443.js","i18n/grid.locale-mne.js":"i18n/grid.locale-mne-eb8ef319d9c9c06e0b5298d19c2e8c40.js","i18n/grid.locale-da.js":"i18n/grid.locale-da-43625072a537ea08c59f8e4b01ddfa2f.js","admin/bootstrap-modal.js":"admin/bootstrap-modal-9a51ee001fcfe417676aea290e1a57a6.js","jquery-1.7.1.min.js":"jquery-1.7.1.min-133b9bbc16ab947eefce2f3142afa268.js","jquery.ui.stars.min.js":"jquery.ui.stars.min-84576934b4ab2fa4b3bafaf0fb10430f.js","i18n/grid.locale-pt.js":"i18n/grid.locale-pt-121341d16d5508260b3cc48ff0033a97.js","admin/googleMapUI.js":"admin/googleMapUI-a8912a0b28d1c505dba92df2141242ab.js","ZeroClipboard.min.js":"ZeroClipboard.min-f52a36d117562783a4d627563b044d0f.js","pms/properties/property_layout.js":"pms/properties/property_layout-27aa79ab5491d5f40c26d74157e3b42b.js","pms/properties/location_auto
$.sceditor.command.set(
"h1",
{
exec: function(content) {
"[h1]"+content+"[/h1]"
},
txtExec: ["[h1]", "[/h1]"]
}
)