Skip to content

Instantly share code, notes, and snippets.

View adrianomargarin's full-sized avatar

Adriano Margarin adrianomargarin

View GitHub Profile
[
{"keys": ["ctrl+shift+i"], "command": "insert_snippet","args": {"contents": "from IPython import embed; embed()"}},
{"keys": ["ctrl+shift+o"], "command": "insert_snippet","args": {"contents": "import ipdb; ipdb.set_trace()"}},
{"keys": ["ctrl+alt+c"], "command": "insert_snippet","args": {"contents": "# -*- coding:utf-8 -*-"}},
{"keys": ["ctrl+shift+d"], "command": "find_under_expand_skip" }
]
{
"folders": [{
"path": ".",
"follow_symlinks": true,
"file_exclude_patterns": [
"*sublime*",
"*.swp",
],
"folder_exclude_patterns": [
"__pycache__",
# admin.py
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django import forms
class MyFormAdmin(forms.Form):
_selected_action = forms.CharField(widget=forms.MultipleHiddenInput)
filefield = forms.FileField(label='File')
export PS1='\[\e]0;`hostname`\a\]\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[31m\] $(__git_ps1 "\[\033[01;33m\](%s)")\[\033[1;31m\]$\[\033[00m\] '
@adrianomargarin
adrianomargarin / heroku-locale-pt_BR.sh
Last active March 1, 2020 21:21
Heroku locale pt_BR
# Solução abaixo:
# https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-locale
# No terminal:
$ heroku buildpacks:add https://github.com/heroku/heroku-buildpack-locale
# Criar um arquivo .locales somente com pt_BR
$ git config --global core.editor vim
$ git config --global user.name "Your Name"
$ git config --global user.email your@email.com
# Python3
# fabric3
# Use $fab deploy
from fabric.api import local
def deploy():
commands = [
"git push heroku master --force",
"heroku run python manage.py migrate",
heroku git:remote -a <nome da sua app>
python-3.6.5
web: gunicorn <path-to-file>.wsgi --log-file -