Skip to content

Instantly share code, notes, and snippets.

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

Rael Max raelmax

🏠
Working from home
View GitHub Profile
@raelmax
raelmax / gist:8dfcb11a089f50e8423aabe307af7711
Created June 11, 2024 13:25
Token Físico A3 (certsign) no Macbook Air M1
Passo a passo:
- Instalar o PJeOffice Pro (versão Mac > Apple Silicon): https://pjeoffice.trf3.jus.br/pjeoffice-pro/docs/index.html?nocache=12.03.2024
- Adquirir um adaptador usb-c > usb-a: https://www.amazon.com.br/Syntech-Thunderbolt-compat%C3%ADvel-anteriores-dispositivos/dp/B07CVX3516/ref=asc_df_B07CVX3516/
- Seguir o tutorial pra configurar os drivers do Token no Mac: https://www.certisign.com.br/duvidas-suporte/certificado-a3-drivers
- No PJeOffice Pro, ir no menu "Configuração de certificado", clicar em "Configurar novo certificado", selecionar "A3", e clicar em "Busca automática";
- Ele deve encontrar os drivers do seu token, daí é só clicar em "OK" e tentar logar no PJE.
PS: funcionou de boas no macbook air m1 + chrome 125 + mac osx 14.4.1 (sonoma)
#!/bin/bash
# Checking if python is installed
if ! [ -x "$(command -v python)" ]; then
echo 'Error: python is not installed. :(' >&2
exit 1
fi
# Build directory
export OLDDIR=$PWD
@raelmax
raelmax / server.py
Created January 21, 2016 17:39
Python SimpleHTTPServer com sleep
import SimpleHTTPServer
import SocketServer
from time import sleep
PORT = 5000
SLEEP_TIME = 6
class SlowHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
@raelmax
raelmax / .vimrc
Last active August 16, 2016 15:32
Vim Config FIle
"""
" Vim Config File
"""
"NeoBundle Scripts-----------------------------
if has('vim_starting')
if &compatible
set nocompatible " Be iMproved
endif
" Required:
# status bar
set-option -g status-utf8 on
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
# default window title colors
@raelmax
raelmax / notebooks.md
Created November 22, 2014 15:47
Notebooks que encontrei com bom custoXbenefício
@raelmax
raelmax / changecommits.sh
Created April 15, 2013 14:35
Change author/commiter info
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ]
@raelmax
raelmax / django_template_tips.md
Last active December 14, 2015 19:18
Django template language tips.

Intro

When we work with frontend on django projects, we have to work with the django template language, some developers dislike, but i like so much and have some tips to improve this experience.

division on template with widthratio

Some times we have to use de division on template, django template language don't offer this feature, but we can "emulate" this behavior with the "widthratio" template tag, see:

[
{
"tema": "Desenvolvimento mobile por onde começar?",
"autor": "Nonilton",
"objetivo": ""
},
{
"tema" : "(RWD) Responsive Web Design: Por uma interface na medida",
"autor": "Emmanuel",
"objetivo": "O objetivo seria conscientizar os novos desenvolvedores da importância do desenvolvimento responsivo e tornar claro aos que pretendem iniciar na programação web que o RWD é um caminho sem volta."
>>> class XYZ(object):
... def __init__(self):
... print 'Output!'
...
>>> kls = 'XYZ'
>>> inst = locals()[kls]
>>> inst
<class '__main__.XYZ'>
>>> inst()
Output!