Just use these:
sudo -u mongodb mongod --repair --dbpath /var/lib/mongodb/
sudo service mongodb start
Of course change dbpath to your dbpath, this one is default.
Basic Auth .htaccess 101
All these are working on Ubuntu 13.04
1. Check if apache modules are loaded:
on ubuntu this one works find:
apache2ctl -M
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
not all required, but my config is loading these now. auth_... and authn_... are realy required for my example, but i don't know which of those authz are required..
1. Check if apache modules are loaded:
on ubuntu this one works find:
apache2ctl -M
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
not all required, but my config is loading these now. auth_... and authn_... are realy required for my example, but i don't know which of those authz are required..
How to make DOM not to wait till javascript is downloaded and just open the page?
That's easy. Just add async attribute to the script tag. DOM will be ready before Javascript is downloaded, so the visitor will see contents of the page faster. It's always better, when your JavaScript is only used for user's interaction.
How to check if image has no code injected?
If you let images with code injection be saved on your server, it is possible, that it's a highwayto your php files and whole database, so it is important to make sure, that if user uploads avatar, it is really an avatar, not some hacky stuff with code injected into the image.
Free Ajax URL shortening service with 1 letter domain!
Hey geeks! Today I will share with you my new Free Ajax URL shortening service with 1 letter domain! It is simple to use, just make POST or GET request to this url:
How to start Android Studio Windows 8 64bit?
Quick tutorial on how to start Android Studio version 0.1 in Windows 8. You can download Android Studio from here: http://developer.android.com/sdk/installing/studio.html
Google April Fools jokes 2013
Here you can see all Google April Fools jokes for 2013. If you know something more, please write about it in comments.
php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory while installing php zip
I was trying to use ZipArchive, but i got an error:
Fatal error: Class 'ZipArchive' not foundThen I started to Google how to install zip extension on my Ubuntu Apache 2 server. I have PHP version 5.3.10 and in configuration it says, that zip is enabled. This information you can get with these 2 simple commands:
How to use template engine in Symfony 2?
How to join 2 SQL tables with PHP? Examples and visualisations
Often you need to join data from 2 tables. You can do it with several SQL queries and PHP, or just use JOIN functions. The JOIN keyword is used in an SQL statement to query data from two or more tables, based on a relationship between certain columns in these tables. Most popular joins are INNER JOIN, LEFT JOIN, RIGHT JOIN and FULL JOIN. It's always good to know the different.
How to hide post footer in blogger all posts or archive view?
In Blogger's configuration you can choose what to show in the footer of your posts, but there are only global footer options for all views of your posts - view of one post, view of all posts list or archive. To hide blogger's post footer in all posts view and in archive view, use this JavaScript custom code. It is fast and super lightweight:
How to start with git versioning?
Git versioning is technique to make versions of your code. It's great for backuping and managing bugs in code. There are some popular sites which gives you ability to start versioning easy. Some of them are free only for public project, some are free for both public and private projects. Most of them are doing pretty same task - enabling you to versionise your precious code.
What is the different between HTML CSS PHP and JavaScript?
HTML - it's like bones for your site. It says what to display on the user's browser: Tables, titles, paragraphs, lists, links etc. It is client-side language which is understood by browsers like Google Chrome, FireFox, Safari.
Subscribe to:
Posts (Atom)