Useful crap and things I can never remember.
How to get random hex values (color values) in python:
rand_color = "#" + str(random.randint(0, 16777215))
Creating a database user and giving them full rights to a database:
GRANT ALL PRIVILEGES ON db_name.* TO 'db_user'@'localhost' IDENTIFIED BY 'the_password!' WITH GRANT OPTION;
0 Comments
Log in with Twitter, Google, Facebook, LinkedIn to leave a comment.