Adding user on MySQL

This will be put here until I create a page of all those things that should be put on one cheat sheet… CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’; GRANT ALL PRIVILEGES ON * . * TO ‘newuser’@’localhost’; FLUSH PRIVILEGES;

How I wasted an entire day on wrong MIME type

Problem description: External CSS file required by HTML was being downloaded from the server but not being applied to the Web page To add to the frustration, if the Web page (which, as mentioned, was rendered without the CSS) was then saved locally from the browser and then that file opened in the browser, it …

Continue reading ‘How I wasted an entire day on wrong MIME type’ »

Browser power from the command line

If you require the ability to programmatically access the full power of the web browser without ever opening a web browser you should take a look at PhantomJS http://phantomjs.org/. Want even more power ? Combine it with CasperJS http://casperjs.org/. With these technologies you can run automated scripts that don’t require any desktop UI or browser …

Continue reading ‘Browser power from the command line’ »

Quick http server

So you want to quickly test some static files from an http server ? Just cd to the folder where these files are and: Using Python 2.x: python -m SimpleHTTPServer 8000 Using Python 3.x: python -m http.server 8000 Another option, if you have PHP installed is: php -S localhost:8000

Various Linux tips

Just some notes that have accumulated: when trying to mount a remote windows NTFS system via: sudo mount -t cifs //192.168.0.112/E -o username=Administrator,password=mypass /home/me/mybackup/ and receiving: wrong fs type bad option bad superblock on … this is because the cifs flag requires: $ sudo apt-get install smbfs more info here Adding a program to unity …

Continue reading ‘Various Linux tips’ »

ssh – automatic remote login

Since I don’t do this often enough to remember – here’s the procedure summarized (for Linux and OS/X, on Windows use putty): me@here is username me at ip/hostname here user@there is username user at ip/hostname there me@here$ cd me@here$ ssh-keygen -t rsa press return a few times, don’t enter passphrase. This will create a public/private …

Continue reading ‘ssh – automatic remote login’ »