Monday, June 17, 2013, 9:04

Geek joke

I’m usually posting these on Twitter, but this one is too good :)
objects

Java Guy: “OK guys. Any idea how to make women more interested in us?”

C++: More exceptions?
Python: New methods?
ANSI-C: Stop treating them like objects?

– via Google+

Monday, June 3, 2013, 15:52

Career-related links

I initially posted on this topic, but new interesting views are coming along :) So I am bookmarking them all here.

  1. David Byttow: ABC: Always Be Coding
  2. Tommy Morgan: How We Hire Developers at Treehouse
  3. Lee Munroe: Side Projects Are Your Playground
  4. Thomas Friedman: How to Get a Job
  5. John Sonmez: The 4 Most Important Skills for a Software Developer
  6. Daniel Blumenthal: What recruiters look for in a resume
Wednesday, May 29, 2013, 14:02

How to back up your daily logs to Dropbox

Here is the complete process of backing up your daily WHM backup file(s) to Dropbox.

Pre-requisites
a. Enable backups in WHM: Home/Backup/Configure Backup/Backup Status:Enabled
b. In case you don’t already have one, a Dropbox account (referral link)

dropbox

Once you have this pre-requisites, you can perform the following operations:
1. Create a Dropbox app dropbox.com/developers/apps
2. Download the Core APIs SDK. I downloaded the PHP flavour and put it in /home/user/dropbox/php-sdk-1.0.1
3. Make sure that the php_curl extension is enabled
4. Create /home/user/dropbox/php-sdk-1.0.1/backup – which will hold the necessary files
5. In the above directory, create a file called login.json with the following content:

{
  "key": "INSERT_APP_KEY",
  "secret": "INSERT_SECRET",
  "access_type": "FullDropbox" or "AppFolder"
}

6. Copy the files ‘authorize.php‘, ‘helper.php‘, ‘upload-file.php‘ from examples/ to backup/ directory
7. Authorize your Dropbox app:

php authorize.php login.json auth.json

This will read the credentials in login.json and attempt to create auth.json file. It will prompt you to open a Dropbox URL where you will authorize your Dropbox app to use your Dropbox account. After you allow, go back to shell, press enter and the auth.json file will be created
8. You’re ready to go. Assuming that WHM creates your daily backups in /backup/cpbackup/daily/ folder, you can run the command below to transfer your tar.gz backup file to Dropbox.

php /home/user/dropbox/php-sdk-1.0.1/backup/upload-file.php /home/user/dropbox/php-sdk-1.0.1/backup/auth.json /backup/cpbackup/daily/user.tar.gz /user.`date +\%Y-\%m-\%d`.tar.gz > /home/user/dropbox/logs/user.`date +\%Y-\%m-\%d`.log

This command will save the output of the operation to a log file for further reference.

9. Email [optional] You can change the command above to send the output by email:

{command above} && mail -s 'Daily backup' 'yourATemail.com' < /home/user/dropbox/logs/user.`date +\%Y-\%m-\%d`.log

10. Cron Put the command at step 8 (or 9) above in a cron: crontab -l or edit the file /var/spool/cron/root and make the changes directly.
Check the new cron jobs: crontab -l
Check the cron log: tail -f /var/log/cron

Friday, May 24, 2013, 11:07

Geometric problem

You have 3 non-colinear points (they are not all on the same line).
Draw the circle that contains all the 3 of them.

Solution:
Draw the perpendicular bisectors of any 2 segments formed using the 3 points. The center of the circle is the intersection of the perpendicular bisectors.

Link: http://www.mathopenref.com/
proof

Thursday, May 23, 2013, 21:53

Ubuntu 13.04 – things I don’t like

1. The shortcuts that are not working:
- I set up the Super + E shortcut to open the Home folder, but it’s only working until the first restart. However, the shortcut is still displayed:
Screenshot from 2013-05-23 22:39:24
- I cannot set up a shortcut using Ctrl + Alt + Pg Down. When I try to define that shortcut, Ctrl+Alt+L is displayed instead:
Screenshot from 2013-05-23 22:42:17

2. Online accounts: Integration of Facebook and Yahoo is simply not working:

https://www.facebook.com/connect/blank.html#_=_

Success
SECURITY WARNING: Please treat the URL above as you would your password and do not share it with anyone.
Screenshot from 2013-05-23 22:43:06

3. Unity Web apps:
Are simply not working in Google Chrome

4. USC
Since the latest stable release of Google Chrome is now available for Ubuntu 13.04, I installed it. First I removed the unstable version from USC, then installed the .deb package downloaded from the official website (https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb).
Apparently it worked:
Screenshot from 2013-05-23 22:32:04
But the USC History reports differently:
Screenshot from 2013-05-23 22:31:54

5. Sorry, Ubuntu 13.04 has experienced an internal error:
Screenshot from 2013-05-23 22:20:14

Pages:1234567...13»

What's new

Browse my tweets using Tweetnest

My latest Flickr photos

My panoramic images

Occipital

My Google+ profile

Google+