Skip to content

Instantly share code, notes, and snippets.

View cavassani's full-sized avatar
🚩
Focusing

Marcelo Sanches Cavassani cavassani

🚩
Focusing
View GitHub Profile
@cavassani
cavassani / gist:f96f7f0927dd7da99cf1be200b051d2d
Created May 9, 2026 21:09
como atualizar o cuda no debian usando ainda os source lists inseguros :
# apt update -o APT::Key::GPGVCommand=1
@cavassani
cavassani / upload-fIles-with-progress-bar.js
Created May 16, 2017 01:05
parte de um arquivo de upload de arquivos feito em um sistema com marionette e backbone.js
uploadFile: function (e) {
var xhr = new XMLHttpRequest();
var form = new FormData();
var files = $(e.currentTarget)[0].files[0];
var allowedTypes = ['application/zip', 'application/x-zip-compressed'];
if (allowedTypes.indexOf(files.type) === -1) {
app.utils.notify({
@cavassani
cavassani / post-receive
Created May 6, 2017 19:42
Hook para deploy teste
#!/bin/bash
printMessage () {
if [ $# -eq 0 ]; then
echo "Usage: printMessage MESSAGE [printMessage_CHARACTER]"
return 1
fi
echo ""
echo ""
printf -v _hr "%*s" 80 && echo -en ${_hr// /${2--}} && echo -e "\r\033[2C$1"