Profile cover photo
Profile photo
Abhishek Bajpai
About
Abhishek's posts

Post has attachment
Change Brightness of Screen in Ubuntu
xrandr --output LVDS1 --brightness 0.9

Post has attachment
Find Last Message FROM All Users
 Query to find out the last message from all users in conversation select messages.message_text, messages.sender_uuid, messages.receiver_uuid, messages.add_date  FROM messages  INNER JOIN ( SELECT  MAX(add_date) AS time, IF(`receiver_uuid` = '1',  `sender_u...

Post has attachment
**
download geoip.inc,geoipcity.inc,geoipregionvars.php,GeoLiteCity.dat from http://www.maxmind.com/en/geolocation_landing   put in geoip named folder include("application/libraries/geoip/geoipcity.inc"); include("application/libraries/geoip/geoipregionvars.ph...

Post has attachment
Mysql, Query to find out table comments?
Here is the Simple Query to find out Comments on Table SELECT a.COLUMN_NAME, a.COLUMN_COMMENT
FROM information_schema.COLUMNS a
WHERE a.TABLE_NAME = 'YOUR_TABLE_NAME'

Post has attachment
Export Data From Server Using Terminal
To Export Data from Terminal Use Following Command : mysql -p -u databasename > databasename.sql To Import Data from Terminal Use Following Command : mysql -p -u databasename < databasename.sql

Post has attachment
Copy Data from server to localhost using ssh
 First Of all compress the file using following command tar -cf name.tar name_of_folder To copy a compressed folder from the server use following command scp user@remotehost.com :/filepath/file.txt /some/localhost/folder scp user@remotehost.com :/var/html/p...

Post has attachment
Get Mysql Query Count
This Query will return the count of queries fired in database   mysqladmin ext | grep -e 'Com_\(update\|select\|insert\)'

Post has attachment
Php: Generate Captcha Secure Image
global $image;     $_SESSION['count'] = time();         $image              = imagecreatetruecolor(200, 50) or die("Cannot Initialize new GD image stream");     $background_color   = imagecolorallocate($image, 255, 255, 255);     $text_color         = image...

Post has attachment
Cakephp: Insert Query In Loop
If You are Using $this->Model->save() in  LOOP then this will not work. TO overcome this issue simply add Add this before save this will move the cursor to a new Line and then insert again. $this->Model->create() $this->Model->save()

Post has attachment
Cakephp: Debugging Query in Cakephp
$log = $this->Model->getDataSource()->getLog(false, false); debug($log);
Wait while more posts are being loaded