-
Receiving Payments with Card – Mercado Pago Developers
“To create the payment, it is important to send the data indicated above”
-
Eclipse: All my projects disappeared from Project Explorer – Stack Overflow
”
accepted
This happened to me. I’m still not sure how, but the reason was that my workspace meta data had become corrupted, probably due to Eclipse being improperly shutdown. The solution, as explained here, is to:Note, steps 2 & 3 are optional if Eclipse isn’t crashing, but just not showing any projects.
Close Eclipse.
cd /home/user/workspace/.metadata/.plugins
mv org.eclipse.core.resources org.eclipse.core.resources_bak
Start Eclipse
Do File->Import
General->Existing Projects into Workspace
Click the “Select root directory” field and browse to each subfolder in your workspace folder, and import.” -
Install pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py -
Usuarios y Tarjetas – Mercado Pago Developers
”
https://www.mercadopago.com.br/integrations/v1/web-tokenize-checkout.js
“ -
plugins – How to disable spell checking in Atom? – Super User
“go to “File / Settings / Packages”
search “spell-check”
click to button “Disable””
Update (weekly)
-
macOS Mojave Slow? Fixes Here – Techsviewer
” Go to “System preferences” the click on “Accessibility”
2. Click on “Display” and check the box next to “Reduce transparency” and “Reduce Motion”.”-
on “System Preferences”.
3. Click on “Desktop and screen savers”.
4. Select the wallpaper you want and set it.
-
-
django – Pytz – timezone activated yet getting wrong time. Am I missing something? – Stack Overflow
“import pytz
from django.utils import timezone”
timezone.activate(pytz.timezone(tz_str))
-
timezone.activate(pytz.timezone(tz_str))
-
Update (weekly)
-
Python Tutorial: Exception Handling
“whereas in Java exceptions are caught by catch clauses, we have statements introduced by an “except” keyword in Python. “
-
How to install Windows 7 on systems with Skylake chipset | Dell Brasil
“modify the image”
-
postgresql – How connect Postgres to localhost server using pgAdmin on Ubuntu? – Stack Overflow
“1. Open the file pg_hba.conf
sudo nano /etc/postgresql/9.x/main/pg_hba.confand change this line:
Database administrative login by Unix domain socket
local all postgres md5
toDatabase administrative login by Unix domain socket
local all postgres trust
Restart the serversudo service postgresql restart
Login into psql and set password
psql -U postgres
ALTER USER postgres with password ‘new password’;
Again open the file pg_hba.conf and change this line:
Database administrative login by Unix domain socket
local all postgres trust
toDatabase administrative login by Unix domain socket
local all postgres md5
Restart the server
sudo service postgresql restartIt works.”
Update (weekly)
-
“My sollution was to reduce the timeout, and to do so without messing with the base installed networking.services systemd file. This will persist during updates in any package.
sudo mkdir -p /etc/systemd/system/networking.service.d/
sudo bash -c ‘echo -e “[Service]\nTimeoutStartSec=20sec” > /etc/systemd/system/networking.service.d/timeout.conf’
sudo systemctl daemon-reload” -
[ubuntu] A start job is running for raise network interfaces (5 mins 1 sec) in ubuntu16.04
“systemctl status systemd-networkd-wait-online.service
Code:
systemctl status NetworkManager-wait-online.service
Disable one and, if it does not fix it, re-enable it and disable the other one.Here’s an example
Code:
sudo systemctl disable systemd-networkd-wait-online.service
Code:
sudo systemctl enable systemd-networkd-wait-online.service” -
Migrate pg dump from Heroku to local sqlite3 development (and beyond)
“heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`# Install postregs & Setup password
# https://help.ubuntu.com/community/PostgreSQL# List databases
sudo -u postgres psql -l# Create database for data
# http://www.commandprompt.com/ppbook/x17149
sudo -u postgres psql template1
template1=# CREATE DATABASE bikedb# or
sudo -u postgres createdb bikedb# Run restore script with options
# http://antonzolotov.com/2012/03/04/rails-scripts-clone-heroku-database-to-development.html
sudo -u postgres pg_restore –verbose –clean –no-acl –no-owner -h localhost -d bikedb latest.dump” -
postgresql – pg_restore asking for password for database when there isn’t one – Stack Overflow
“If you’re specifying -h localhost explicitly then you’re using TCP/IP, so you’ll need to either omit -h localhost”
Update (weekly)
-
What is the best free GUI PostgreSQL client for macOS? – Quora
“Valentina Studio is free and available on the Mac OS X platform.
I can’t help but notice many answers here are for products that don’t have a free version. Valentina Studio is easy to use, and is regularly updated on a regular basis. It is also available through the Mac App Store”
-
“hostname=XXX port=443 trust_cert_file_location=`curl-config –ca` sudo bash -c “echo -n | openssl s_client -showcerts -connect $hostname:$port \ 2>/dev/null | sed -ne ‘/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p’ \ >> $trust_cert_file_location””
-
Clonezilla Clone Larger Disk to Smaller Disk-Workaround
“Choose EXPERT mode and enable the “-icds” option”
-
How to Rearrange and Remove Your Mac’s Menu Bar Icons
“To move any menu bar icon, simply hold the “Command” key, then click and drag the icon. You can move any icon anywhere this way”
Update (weekly)
-
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”
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”
Update (weekly)
-
Ubuntu 16.04 – system boot waits saying “Raise network interfaces” – Ask Ubuntu
“Edit this file /etc/dhcp/dhclient.conf and set timeout to a reasonable value, like
timeout 15
The default value of 300 seconds is way too high”
-
How can I deactivate Bluetooth on system startup? – Ask Ubuntu
“Run sudoedit /etc/rc.local and add this before line with exit 0:
rfkill block bluetooth”