Skip to content

Instantly share code, notes, and snippets.

mkdir /tmp/cert
docker run -it --rm --name certbot -v "/tmp/cert:/etc/letsencrypt" -v "/tmp/cert:/var/lib/letsencrypt" --net host certbot/certbot certonly --manual --preferred-challenges dns
1. enter email
2. Agree with terms
3. share OR NOT your email with EFF
4. enter the domain with or without wildcard
5. Go to your domain manager and add a dns record type TXT, with name _acme-challenge.DOMAIN with the value from the terminal
6. go to dnschecker.org and change the type to TXT and add the address _acme-challenge.DOMAIN
7. Wait until dns is propagading and only continue after you see every (or almost) CHECK on the list
@feliperuhland
feliperuhland / irpf.py
Last active November 25, 2019 16:45
É possível obter o número do recibo de declaração de imposto de renda pessoa física (original ou retificação) diretamente do arquivo .DEC
"""
É possível obter o número do recibo de declaração de imposto de renda pessoa física
(original ou retificação) diretamente do arquivo .DEC
"""
with open("FILE.DEC", "rb") as f:
data = f.read()
data[101:111]
b'XXXXXXXXXX'

Keybase proof

I hereby claim:

  • I am feliperuhland on github.
  • I am ruhland (https://keybase.io/ruhland) on keybase.
  • I have a public key ASDwm5vFPE1CNJT1fG9PrtvsmGInMqOVVqmBnLXaMmqTzgo

To claim this, I am signing this object:

@feliperuhland
feliperuhland / install_arch
Last active April 29, 2017 22:03
ArchLinux Script
#!/bin/bash
# encoding: utf-8
# wget https://goo.gl/wr93vY
##################################################
# Variaveis #
##################################################
# Nome do Computador
HOSTN=Arch-VM
Python 2.7.10 (default, Sep 7 2015, 13:51:49)
[GCC 5.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 1
>>> def aa():
... print(a)
...
>>> aa()
1
>>> def aa():
@feliperuhland
feliperuhland / copy keys
Created March 31, 2015 17:51
Copy pub keys
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
@feliperuhland
feliperuhland / mock_raw_input
Last active August 29, 2015 14:00
Mock raw_input
import mock
from django.test.testcases import TestCase
class TestMockRawInput(TestCase):
@mock.patch('__builtin__.raw_input', return_value='Y')
def test_mock_raw_input(self, input):
pass
@feliperuhland
feliperuhland / gitignore
Created December 30, 2013 17:01
gitignore
#comentario
/bin
/bin/.*
/target/
/target/.*
/target-deploy/
/target-deploy/.*
/\.settings/
/\.settings/.*
/\.classpath