DEVGET.NET Blog

How to add user to samba share 0

How to add user to samba share

Assuming the user already exists

smbpasswd -a [username]

This will prompt you to add a password. This is normal as the samba password and the unix password is stored in different databases

How to search inside files in linux 0

How to search inside files in linux

To search within files we can use the command grep (man grep). Basic usage is as follows:

grep -Ril "mail" /var/www/

This will search our web root folder (/var/www/) for any text with the word ‘mail’ inside it.

  • R – Recursive
  • i – uppercase/lowercase
  • l –  Show file name instead of actual location
How to enable .htaccess in apache 0

How to enable .htaccess in apache

Step 1.

cd /etc/apache2/sites-available

Step 2.

vim default (or default-css)

Step 3. Change AllowOverride from ‘None’ to ‘All’

<VirtualHost *:80>
    ServerAdmin webmaster@localhost

    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride All    <---- replace None with All
    </Directory>
    <Directory /var/www >
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All   <---  replace None with All
            Order allow,deny
            allow from all
    </Directory>

Step 4. Enable Mod Rewrite

sudo a2enmod rewrite

5. Restart Apache

service apache2 restart

You are now done…

Sample .htaccess…

(more…)

List of AD networks and CPM Rates (ongoing) 0

List of AD networks and CPM Rates (ongoing)

These are the rates for an average entertainment site with 300×250 banner ads.

Network Name eCPM Other Notes Fill P
 ValueClick  $0.75  You get to pick your own ads and high fill rate. Awesome Tier 1 Ad Network  15%  Y
PulsePoint $1.00 As you get to choose your own rate. The eCPM can Potentially be higher or lower but I’ve found this to be the best to get a reasonable fill rate 25% Y
Lijit $0.40 Lijit has Separate Rates for US traffic and ‘International’ Traffic. Noted here is US. By default, International CPM and fill rte is slightly lower 80% Y
 Yllix  $0.03  Extremely poor fillrate as well as low CPM. Fail to see why anyone would use them.  5% N
Copacet  N/A  CPC
 CPMFun $0.05  Impressive fill rate but the low CPM makes it not worth your time. 70% N
 CPM Go  $0.30  Above average eCPM and relatively good fill rate. Definitely one of the more impressive underdogs in the ad network world.  50%  Y

T* – > Traffic Utilization (how much of traffic sent to network was actually used)
P -> Passback tags (Y – Yes :  N – No)
E. eCPM* -> Effective Passback tags, CPM rate when T* is taken into account ( do not use literally is completely inaccurate if ad network uses Passback tags)

More data is always appreciated as this is an ongoing list. Seek me out in the comments if you have anything you wish to share

How to setup a Nginx Server (LEMP Stack) 0

How to setup a Nginx Server (LEMP Stack)

nginx-logo

Setup an Ubuntu Server with only the

  • [x] Essential Services
  • [x] SSH Server

Login as root

Lets start with an update

apt-get update
apt-get upgrade

To secure your server a bit. Edit ssh and change the default port

nano /etc/ssh/sshd_config

Change ‘port 22’ to whatever port you wish to use then…

service ssh reload

(you can now login like this:  ssh root@ur.server.ip.ip -p portyouchose )

We now begin setting up the actual server components starting with MySQL

apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

(you will be prompted to enter your password here: lets call that passwordA)

Now MySQL is installed lets configure for production use.

mysql_install_db
/usr/bin/mysql_secure_installation

It my ask for the root password: enter passwordA which you entered above.
Do you want to change password: N
Remove Anonymous Users: Y
Disallow Root Login Remotely: Y
Remove test Database: Y
Reload Tables: Y

All done!! At Least with MySQL

During the installation of MySQL an apache server may have been setup.. since we want LEMP (we need to uninstall apache2 and install Nginx) do that with

(uninstall apache)

service apache2 stop
apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
apt-get autoremove

(install Nginx)

apt-get install nginx
service nginx start

(you can do a ‘ifconfig’ to get ip address and test out server in your browser)

On to the last part. Installing PHP.

apt-get install php5-fpm

And configure it..

Open php.ini

vim /etc/php5/fpm/php.ini # you may use nano if u wish (nano /etc/php...)

find ‘cgi.fix_pathinfo=1’ and replace with ‘cgi.fix_pathinfo=0’ – this makes PHP not ‘guess’ what urls users are trying to go to (added security)

and restart php

service php5-fpm restart

Well.. thats about it.. your html files are at /usr/share/nginx/www

For added security you can install denyhosts

apt-get install denyhosts

and phpmyadmin

apt-get install phpmyadmin

 

Enjoy your new high performance and secure Nginx server.

BBM for Android (and iPhone) Officially Released 0

BBM for Android (and iPhone) Officially Released

2013-10-21-18-44-50Yup, you’ve read right. Blackberry messenger for android has finally been released and you can get it now here. Despite all the false starts and their fiasco of a launch its nice to see RIM finally pull through.

As with everything good there is always a bit of a catch. As quoted from Blackberry

As you know, in just seven hours, about one million Android users were using the unreleased version of BBM for Android. What you don’t know is that more than one million people have found creative ways to “side load” BBM on their iPhone. This is incredible.

To help manage this unprecedented pent up demand for BBM, we are implementing a simple line-up system to ensure a smooth roll out.

Translated, it means: While you and anyone else can install the app to your phone you need to have previously signed up to actually run it. If you didn’t opt-in before, then you need to now, then wait until your turn comes to be given access.

As one who has been following RIM since the pre-release, I have already registered with them and therefore was lucky enough to bypass their queue. If you’re stuck waiting and you have any questions about the app, then leave a comment and I’ll answer them as best I can.

BBM Play Store Link: BBM for Android

Here are a few Screenshots of the app throughout the initial start-up and installation process. [Taken on Galaxy Note II running BBM for Android]

2013-10-21-18-44-132013-10-21-18-44-302013-10-21-18-44-502013-10-21-18-46-09

bbm-for-android-screenshot

2013-10-21-19-26-30

How to fix Windows 8.1 LogiLDA.dll boot error 0

How to fix Windows 8.1 LogiLDA.dll boot error

logiLDA-error-windows8.1

After a Windows 8.1 upgrade, one may experience an error such as in the image above. Saying

There was a problem starting C:WindowsSystem32LogiLDA.dll
The Specified Module could not be found

This is a slight flaw in the upgrade but luckily, the fix is pretty simple. Just put the following in a bash file and run it, or alternatively open up Command Prompt and run it. (more…)