Device administrator: Can’t activate/deactivate

One of the biggest nuisances with Android (Samsung phones especially) is sometimes the Cancel and Activate or Deactivate buttons are totally disabled or do not do anything clicking. When this happens

Fix:

  1. Take the battery out
  2. Keep it shut off for a 2-3 minutes.
  3. Put the battery on and switch on the phone.

That is it. Now you should be able to deactivate or activate new device administrators.This fix applies when you cannot take the useless Lookout app from the Samsung phones.

 

Advertisements

Cheapest and fastest way to get a passport/visa application photo

Total cost: 35 cents

Effort: 1 hour

Short:

1. Take a regular photograph against a white background.

2. Upload the photo to

http://www.idphoto4you.com/

and adjust it as needed.

3. Login into walgreens. Upload the 4×6 sheet downloaded in step #3.

4. Print the 4×6 photo of passport photos created . You get 4 passport sized photos in one 4×6 sheet.

5. Pick it up at a nearest walgreens store within in hour.

Long Story:

This is the fastest and cheapest way to get a passport/visa photo for a toddler. It just costs 35 cents.

If you feel like paying some money:

$1.50: http://www.epassportphoto.com

$8-10: go to walgreeens

$5: Go to costco

Fixing brew and nginx on OS X Yosemite

OS X Yosemite upgrade messed up both brew and nginx on my Mac.

The following are reasonably safer ways to fix both of them.

1. Fix brew

ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

2. Fix nginx next

brew install nginx

or

brew reinstall nginx

Related errors

Brew:

$ brew
/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

Nginx

$ sudo nginx
nginx: [emerg] mkdir() “/usr/local/var/run/nginx/client_body_temp” failed (2: No such file or directory)

References:

http://stackoverflow.com/questions/24225959/how-to-get-ruby-homebrew-rvm-to-work-on-yosemite

mysql utf8mb4: Specified key was too long; max key length is 767 bytes

Specified key was too long; max key length is 767 bytes

That error means you are trying to add unique index on a varchar(255) utf8mb4 column. In utf8mb4 column, each character needs 4 bytes. So 255 characters means 1020 bytes. The max key length is 767 bytes.

Option1:

Do you really need 255 characters?..if not reduce it.

change_column :attachments, :message_uuid, :string, :limit => 38

Option2:

If you really need all 255 characters, consider using this innodb setting.

http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html#sysvar_innodb_large_prefix

So its Charlie Sheen who invented the Kickstarter rewards scheme in 1993

So its Charlie Sheen who invented the Kickstarter rewards scheme in 1993

Watch from 4:06 minutes onwards if the video does not start at that time.

 

Reward1: For $15 you get a hot shots T-Shirt

Reward2: For $25, a hat and T-Shirt

Reward n: For $20,000, you get billing above the title.

https://www.youtube.com/watch?v=nuj2Q06miP0#t=246

He also holds the fundraising record as well, raised 4.5 Million in 2.5 hours.

Git : Stage Hunk and Discard Hunk (SourceTree)

Hunk means a piece of change in the Git world. Stage hunk means it is being added to the staging area.

Discard Hunk means remove the change without trace.

Replace the word ‘hunk’ with ‘change’ and it becomes pleasurable to follow Git.

Screen Shot 2014-08-01 at 12.25.32 PM

If you don’t want to commit your change , you will have to discard your changes (hunks). God knows why the Git geeks chose “hunk” but it is what it is. Learn to love it and other idiosyncrasies(stash,rebase, to survive in Gitland.