-
Set timezone for your Heroku app (Example)
“heroku config:add TZ=”America/Los_Angeles””
-
python – Convert a String representation of a Dictionary to a dictionary? – Stack Overflow
“Starting in Python 2.6 you can use the built-in ast.literal_eval:
>>> import ast
>>> ast.literal_eval(“{‘muffin’ : ‘lolz’, ‘foo’ : ‘kitty’}”)
{‘muffin’: ‘lolz’, ‘foo’: ‘kitty’}” -
Heroku Postgres | Heroku Dev Center
“heroku pg:pull HEROKU_POSTGRESQL_MAGENTA mylocaldb –app sushi”
-
python – How to setup PostgreSQL Database in Django? – Stack Overflow
“‘ENGINE’: ‘django.db.backends.postgresql’,
‘NAME’: ‘db_name’,
‘USER’: ‘db_user’,
‘PASSWORD’: ‘db_user_password’,
‘HOST’: ”,
‘PORT’: ‘db_port_number’,” -
Backend boto3 and signature v4 · Issue #203 · jschneier/django-storages · GitHub
”
AWS_S3_REGION_NAME = ‘us-east-2’
AWS_S3_SIGNATURE_VERSION = ‘s3v4′” -
Atom Editor Cheat Sheet (Sweetmeat)
“Find Matching Bracket ⌃-m”
Mês: junho 2018
Update (weekly)
-
How do I print a Python datetime in the local timezone? – Stack Overflow
from datetime import datetime
import pytz
from tzlocal import get_localzone # $ pip install tzlocalutc_dt = datetime.now()
print(utc_dt.astimezone(get_localzone())) # print local time -
git – How to change line-ending settings – Stack Overflow
“Checkout Windows-style, commit Unix-style
Git will convert LF to CRLF when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects, this is the recommended setting on Windows (“core.autocrlf” is set to “true”)
Checkout as-is, commit Unix-style
Git will not perform any conversion when checking out text files. When committing text files, CRLF will be converted to LF. For cross-platform projects this is the recommended setting on Unix (“core.autocrlf” is set to “input”).
Checkout as-is, commit as-is
Git will not perform any conversions when checking out or committing text files. Choosing this option is not recommended for cross-platform projects (“core.autocrlf” is set to “false”)”
-
Turn on Line Wrap – support – Atom Discussion
“Atom > Open Your Config
Add ‘softWrap’:true to the ‘editor’ section like this:
‘editor’:
‘softWrap’: true”
Update (weekly)
-
“displays the size of the focused file in the status-bar”
-
“Display Atom editor tabs in multiple rows for easy navigation and viewing”
-
GitHub – lgeiger/ide-python: Python language support for Atom-IDE
“Install the language server (0.19.0 or newer) with:
pip install python-language-server
-
-
Install
ide-python
andatom-ide-ui
from Install in Atom’s settings
-
-
“Installing Atom on Windows
Atom is available with a Windows installer that can be downloaded from https://atom.io or from the Atom releases page named AtomSetup.exe”
-
How to save and restore session data across logout/relogin in Django? – Stack Overflow
“Each time I want to save or retrieve a key value pair, I check if the user is logged in. If they aren’t, I save the data to the session. If they are, I save the data to the account_data table”
-
Mouse can’t click on Wayland ubuntu 17.10 – Ask Ubuntu
“Disabling Wayland must solve this issue. Similar question was answered here. Worked for me.
If you wish to do it permanently, edit
/etc/gdm3/custom.conf and uncomment the line:
#WaylandEnable=false”
Update (weekly)
-
Suspend-resume problems on Ubuntu 18.04 – Dell Community
“nouveau.modeset=0”
– mobprobe.blacklist=nouveau não mais, já que driver nvidia não está instalado…
-
python – Django DB Settings ‘Improperly Configured’ Error – Stack Overflow
“You can’t just fire up Python and check things, Django doesn’t know what project you want to work on. You have to do one of these things:
Use python manage.py shell”