This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/so-fancy/diff-so-fancy/ | |
https://github.com/paulirish/git-open |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You try: | |
sudo dpkg --remove-architecture armhf | |
# and get: | |
# dpkg: error: cannot remove architecture 'armhf' currently in use by the database | |
# So you have to remove the armhf packages installed to be able to `dpkg --remove-architecture armhf` | |
apt-get remove --purge `dpkg --get-selections | grep armhf | awk '{print $1}'` | |
# Then: | |
sudo dpkg --remove-architecture armhf | |
# SUCCESS!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The workaround is to disable BT by adding the following to config.txt: | |
dtoverlay=pi3-disable-bt | |
# Source: https://raspberrypi.stackexchange.com/questions/45570/how-do-i-make-serial-work-on-the-raspberry-pi3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR: | |
wget https://bootstrap.pypa.io/get-pip.py | |
Connecting to bootstrap.pypa.io (151.101.56.175:443) | |
wget: error getting response: Connection reset by peer | |
FIX: | |
apk update | |
apk add ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /usr/local/sbin/resize_rootfs.sh | |
sudo /usr/local/sbin/pine64_update_kernel.sh | |
sudo /usr/local/sbin/pine64_update_kernel.sh | |
sudo /usr/local/sbin/pine64_update_uboot.sh | |
sudo /usr/local/sbin/pine64_fix_whatever.sh | |
sudo /usr/local/sbin/install_mate_desktop.sh | |
# if it fails when installing mate: | |
sudo dpkg --configure -a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to the terminal, type: | |
defaults read com.apple.universalaccess reduceTransparency | |
# If it returns 1, set false and reboot. Type: | |
defaults write com.apple.universalaccess reduceTransparency -bool FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Follow the instructions on our README: | |
https://github.com/douglasmiranda/django-fine-uploader#quickstart | |
Then you can use this html as an example. | |
If you are lazy, don't worry, we have a example project: | |
https://github.com/douglasmiranda/django-fine-uploader/tree/master/example | |
--> | |
<!DOCTYPE html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.vinta.com.br/blog/2016/database-concurrency-in-django-the-right-way/ | |
from django.db import transaction | |
# ... | |
class SimpleHandler(View): | |
def get(self, request, *args, **kwargs): | |
myData = Data.objects.create(name='Dummy') | |
transaction.on_commit(lambda: do_stuff.delay(myData.pk)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Flash SD card | |
# https://github.com/hypriot/flash | |
sudo apt-get update | |
sudo apt-get upgrade | |
# udpdate firmware | |
sudo rpi-update | |
# deluge torrent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://mysite.com/media/file.pdf | |
# absolute path: /path/to/media/directory/file.pdf | |
location /media { | |
alias /path/to/media/directory; | |
expires max; | |
access_log off; | |
location ~* \.(pdf)$ { | |
if ($arg_download = 1){ | |
add_header Content-Disposition 'attachment;'; | |
} |