Skip to content

Instantly share code, notes, and snippets.

View guibeira's full-sized avatar
🏠
Working from home

Guilherme de S. Vieira Beira guibeira

🏠
Working from home
View GitHub Profile
@jeremychone
jeremychone / rust-xp-01-s3.rs
Last active October 11, 2024 13:18
Rust Quick Example to connect to S3 and Minio bucket server
#![allow(unused)] // silence unused warnings while exploring (to comment out)
use std::{error::Error, str};
use s3::bucket::Bucket;
use s3::creds::Credentials;
use s3::region::Region;
use s3::BucketConfiguration;
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8
@LukeMathWalker
LukeMathWalker / audit.yml
Last active November 3, 2024 05:37
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
#Para quem tem que deletar muita msg das dead_queue,
#e tem que selecionar uma a uma quais msg deseja excluir.
#Seus problemas acabaram! abra a fila clique em visualizar e buscar e no console cole isso:
function find_and_delete_many(to_find){
for (let item of to_find) {
console.log(item)
$("div[style='overflow:hidden;white-space:nowrap;']").each(function( index ) {
var text_to_validate = $(this).text()
@goldhand
goldhand / Django + Ajax dynamic forms .py
Last active September 29, 2023 06:32
Django form with Ajax. A simple Task model that can be updated using a CBV with an AJAX mixin. The view sends post data with ajax then updates the view with a callback to a DetailView with a json mixin.There is an abstract CBV, AjaxableResponseMixin, based on the example form django docs, that is subclassed in the TaskUpdateView CBV. TaskUpdateV…
#models.py
class Task(models.Model):
title = models.CharField(max_length=255)
description = models.TextField()
def __unicode__(self):
return self.title