Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Lista de IDs de todos os containers Docker
container_ids=$(docker ps -aq)
# Data limite em segundos (10 dias = 10 * 24 * 60 * 60 segundos)
limit=$((7 * 24 * 60 * 60))
# Lista de containers que não devem ser afetados pelo script
excecoes=("paulo_antunes-nginx-1" "paulo_antunes-webmock-1" " paulo_antunes-mongoadmin-qtm-suat-requests-1" "paulo_antunes-web-qtm-suat-requests-1" "paulo_antunes-web-trader-request-1" "cloudbeaver-desenv")
#define TRIGF 5
#define ECHOF 7
#define MOTORR 12
#define MOTORL 13
#define MINDIST 30
#define GRIDSIZE 10
#define LEFT 1
#define RIGHT 2
int grid[GRIDSIZE][GRIDSIZE];
!function(g){var s={barWidth:1,barHeight:50,moduleSize:5,showHRI:!0,addQuietZone:!0,marginHRI:5,bgColor:"#FFFFFF",color:"#000000",fontSize:10,output:"css",posX:0,posY:0},h=["NNWWN","WNNNW","NWNNW","WWNNN","NNWNW","WNWNN","NWWNN","NNNWW","WNNWN","NWNWN"];function d(r,t,e){var n,o,a,i,c,f="";if(r=function(r,t,e){var n,o,a=!0,i=0;if(t){for("int25"===e&&r.length%2==0&&(r="0"+r),n=r.length-1;-1<n;n--){if(o=R(r.charAt(n)),isNaN(o))return"";i+=a?3*o:o,a=!a}r+=((10-i%10)%10).toString()}else r.length%2!=0&&(r="0"+r);return r}(r,t,e),"int25"===e){for(f+="1010",n=0;n<r.length/2;n++)for(a=r.charAt(2*n),i=r.charAt(2*n+1),o=0;o<5;o++)f+="1","W"===h[a].charAt(o)&&(f+="1"),f+="0","W"===h[i].charAt(o)&&(f+="0");f+="1101"}else if("std25"===e){for(f+="11011010",n=0;n<r.length;n++)for(c=r.charAt(n),o=0;o<5;o++)f+="1","W"===h[c].charAt(o)&&(f+="11"),f+="0";f+="11010110"}return f}var v=[["0001101","0100111","1110010"],["0011001","0110011","1100110"],["0010011","0011011","1101100"],["0111101","0100001","1000010"],["0100011","001110
@PauloDuarte43
PauloDuarte43 / pyDes.py
Created November 5, 2021 00:24 — forked from eigenein/pyDes.py
A pure python implementation of the DES and TRIPLE DES encryption algorithms
#############################################################################
# Documentation #
#############################################################################
# Author: Todd Whiteman
# Date: 16th March, 2009
# Verion: 2.0.0
# License: Public Domain - free to do as you wish
# Homepage: http://twhiteman.netfirms.com/des.html
#
@PauloDuarte43
PauloDuarte43 / curl.md
Created August 13, 2019 19:01 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@PauloDuarte43
PauloDuarte43 / pogo_moves.rb
Created May 14, 2019 18:21 — forked from ReyesK/pogo_moves.rb
Script to export all moves from POGO GAME_MASTER
# Script to export all moves from POGO GAME_MASTER
# Shout out to pekingduck on github https://github.com/pekingduck - This script will run off the file provided by pekingduck found here: https://github.com/pekingduck/pogo-game-master/blob/master/current.json
# Written with ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
# ran on MacOS 10.12.5
#
# run script from directory using `ruby pogo_moves.rb`
require "open-uri"
require "json"
# -*- encoding: utf-8 -*-
import re
import requests
post_data = {'tel': '51991698547'}
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
r = requests.post('http://consultanumero.info/consulta', post_data, headers=headers)
html = r.content
operadora = re.search('(<div class=\"resultado\">.*?alt=\")(.*?)(\".*?/>)', html, re.M|re.I|re.S)
@PauloDuarte43
PauloDuarte43 / migrate.py
Created July 20, 2017 15:29 — forked from adoc/migrate.py
SQLAlchemy Migration Tool
#!/usr/bin/env python
"""
# Original Author: Tyler Lesmann
# Original Source: http://www.tylerlesmann.com/2009/apr/27/copying-databases-across-platforms-sqlalchemy/
# TODO: Look at https://gist.github.com/thoas/1589496 if any
# "sequencing" issues come in to play.
PS1='\n\[\e[1;37m\]|-- \[\e[1;32m\]\u\[\e[0;39m\]@\[\e[1;36m\]\h\[\e[0;39m\]:\[\e[1;33m\]\w\[\e[0;39m\]\[\e[1;35m\]$(__git_ps1 " (%s)")\[\e[0; 39m\] \[\e[1;37m\]--|\[\e[0;39m\]\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\]'
https://bneijt.nl/blog/post/add-a-timestamp-to-your-bash-prompt/
{% for ingredient in pizza.ingredients.all %}
{% if forloop.first %}
{{ ingredient.name }}
{% else %}
{% if forloop.last %}
e {{ ingredient.name }}
{% else %}
, {{ ingredient.name }}
{% endif %}
{% endif %}