Mac : Cool youtube shortcuts

Here are cool keyboard shorts for youtube :

F => Full screen / toggle
K => pause / Play
J  => 10 Sec rewind
L => 10 Sec forward
Shift + N => Next video
Shift + P = > Previous video
Up arrow => Volume high
Down arrow => Volume low

here are all shortcuts




What is Memcached ?

As name suggested Memcached is cache which could be though of as big key value pair bucket residing on RAM which can deliver frequently used data instantly by avoiding datasource access.

Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Memcached’s APIs provide a very large hash table distributed across multiple machines. When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order.[3][4] Applications using Memcached typically layer requests and additions into RAM before falling back on a slower backing store, such as a database.

Converting database or object creation queries to use Memcached is simple. Typically, when using straight database queries, example code would be as follows:

 function get_foo(int userid) {
    data = db_select("SELECT * FROM users WHERE userid = ?", userid);
    return data;

After conversion to Memcached, the same call might look like the following

 function get_foo(int userid) {
    /* first try the cache */
    data = memcached_fetch("userrow:" + userid);
    if (!data) {
       /* not found : request database */
       data = db_select("SELECT * FROM users WHERE userid = ?", userid);
       /* then store in cache until next get */
       memcached_add("userrow:" + userid, data);
    return data;

The client would first check whether a Memcached value with the unique key “userrow:userid” exists, where userid is some number. If the result does not exist, it would select from the database as usual, and set the unique key using the Memcached API add function call.

However, if only this API call were modified, the server would end up fetching incorrect data following any database update actions: the Memcached “view” of the data would become out of date. Therefore, in addition to creating an “add” call, an update call would also be needed using the Memcached set function.

 function update_foo(int userid, string dbUpdateString) {
   /* first update database */
    result = db_execute(dbUpdateString);
    if (result) {
       /* database update successful : fetch data to be stored in cache */
       data = db_select("SELECT * FROM users WHERE userid = ?", userid);
       /* the previous line could also look like data = createDataFromDBString(dbUpdateString); */
       /* then store in cache until next get */
       memcached_set("userrow:" + userid, data);

This call would update the currently cached data to match the new data in the database, assuming the database query succeeds. An alternative approach would be to invalidate the cache with the Memcached delete function, so that subsequent fetches result in a cache miss. Similar action would need to be taken when database records were deleted, to maintain either a correct or incomplete cache.

What is ISO date format

As world is becoming a big family with globalization, we need the standard to followed to avoid confusion especially related to date and time. If every country or person would write dates in different format, it would be confusing to figure out exact date while doing communication across countries, hence ISO has come up with ISO date format to be followed by every one. 

International Standard ISO 8601 specifies numeric representations of date and time. This standard notation helps to avoid confusion in international communication caused by the many different national notations and increases the portability of computer user interfaces.



     YYYY = four-digit year

     MM   = two-digit month (01=January, etc.)

     DD   = two-digit day of month (01 through 31)

     hh   = two digits of hour (00 through 23) (am/pm NOT allowed)

     mm   = two digits of minute (00 through 59)

     ss   = two digits of second (00 through 59)

     s    = one or more digits representing a decimal fraction of a second

     TZD  = time zone designator (Z or +hh:mm or -hh:mm)


 1997-07-16T19:20:30.45Z (Z at end indicates time is taken with Zero correction i.e. UTC time)

 1997-07-16T19:20:30.45+01:00 (+1:00 at end indicates time is taken at time zone which is 1:00 ahead of UTC time)

Advantages of the ISO 8601 standard date notation compared to other commonly used variants:

  • easily readable and writeable by software (no ‘JAN’, ‘FEB’, … table necessary)
  • easily comparable and sortable with a trivial string comparison
  • language independent
  • can not be confused with other popular date notations
  • consistency with the common 24h time notation system, where the larger units (hours) are also written in front of the smaller ones (minutes and seconds)
  • strings containing a date followed by a time are also easily comparable and sortable (e.g. write “1995-02-04 22:45:00”)
  • the notation is short and has constant length, which makes both keyboard data entry and table layout easier
  • identical to the Chinese date notation, so the largest cultural group (>25%) on this planet is already familiar with it 🙂
  • date notations with the order “year, month, day” are in addition already widely used e.g. in Japan, Korea, Hungary, Sweden, Finland, Denmark, and a few other countries and people in the U.S. are already used to at least the “month, day” order
  • a 4-digit year representation avoids overflow problems after 2099-12-31

How to write and execute mongoDB scripts

There are times when we need to save the steps or commands of mongo shell and need to get it executed in the same order (for reusability and automation and avoid errors). The best solution is to save it in a file with any extension preferred is js, however I call it as mjs which means mongo javascript. With below command you can run it in bash

aseem278$ mongo < /Users/asee2278scripts/mongoScript.mjs

TIP : To be effective while writing query, you write commands using IDE to use auto complete, formatting, Json format verification and then redirect input to mongo 

Sample mongoScript.mjs

use school


var types = [‘exam’, ‘homework’, ‘quiz’]

for (student_id = 0; student_id < 100; student_id++) {

    for (type=0; type < 3; type++) {

   var r = {‘student_id’:student_id, ‘type’:types[type], ‘score’:Math.random() * 100};




How to Save google Maps locations using name you want

Bookmarking or saving locations to the app is handy but who searches for their friends’ place by address? Without the ability to rename the address to something more recognizable, you’d likely forget which address is where.

However, when you search for an address or locate current location and save it to the list, you won’t be able to rename the address through the app into something more recognizable. Let’s try to fix that.

We’re going to show you how to rename saved locations for the Google Maps app for both iOS and Android users.

Saving A Location On Google Maps


Saving a landmark through the Google Maps app is great as you’ll be able to see the store name, together with the address at the bottom like what you see below.


Renaming Addresses Of Saved Locations

To rename an address, navigate on your browser Once you’ve logged in, you’ll be able to see all the locations you’ve saved through the Google Maps app.

Maps Bookmarks

Click on Edit to change the name of the address and click on Save when you’re done.



Hope you enjoyed our quick-tip of renaming bookmarked or saved locations on the Google Maps app which works for both iOS and Android users.

JavaScript Much watch video list

The github link has lot of nice video since 2010 which are really nice to get deeper in Java script.


  1. Ilya Grigorik: Website Performance Optimization (Udacity course) [1:13:57]
  2. Mark DiMarco: User Interface Algorithms [27:41]
  3. Neil Green: Writing Custom DSLs [29:07]
  4. Philip Roberts: Help, I’m stuck in an event-loop [20:13]
  5. Eric Bidelman: Polymer and Web Components change everything you know about Web development [36:12]
  6. Alex Russell, Jake Archibald: Bridging the gap between the web and apps [48:40]
  7. Scott Hanselman: Virtual Machines, JavaScript and Assembler [25:56]
  8. Jafar Husain: Async JavaScript with Reactive Extensions [26:38]
  9. John-David Dalton: Unorthodox Performance [43:39]
  10. Gary Bernhardt: The Birth & Death of Javascript [29:22]
  11. Addy Osmani: Memory Management Masterclass [55:06]
  12. Reginald Braithwaite: Invent the future, don’t recreate the past [39:16]
  13. Kyle Simpson: Syncing Async [42:25]
  14. Ariya Hidayat: JavaScript and the Browser: Under the Hood [29:13]
  15. Jafar Husain: Version 7: The Evolution of JavaScript [1:11:53] ♨


  1. Nat Duca, Tom Wiltzius: Jank Free: Chrome Rendering Performance [40:53]
  2. Ilya Grigorik: Automating Performance Best Practices with PageSpeed [46:58]
  3. Eric Bidelman: Web Components [32:39]
  4. Alex Komoroske, Matthew McNulty: Web Components in Action [41:28]
  5. Paul Lewis, Peter Beverloo: Device Agnostic Development [40:44]
  6. John McCutchan, Loreena Lee: A Trip Down Memory Lane with Gmail and DevTools [42:09]
  7. Joe Marini: Upgrading to a Chrome Packaged App [43:49]
  8. Pete Hunt: React: Rethinking best practices [29:31]
  9. Martin Kleppe: 1024+ Seconds of JS Wizardry [31:01]
  10. Yehuda Katz: A tale of two MVC’s [31:06]
  11. Vyacheslav Egorov: Performance and Benchmarking [25:41]
  12. Brendan Eich: JavaScript at 18: Legal to Gamble [25:44]
  13. Mathias Bynens: JavaScript ♥ Unicode [26:12]


  1. Ryan Sandor Richards: Garbage Collection & Heap Management [32:57]
  2. Addy Osmani: Scaling Your JavaScript Applications
  3. John-David Dalton: Lo-Dash [25:08]
  4. Gary Bernhardt: WAT [4:17]
  5. Angus Croll: Break all the rules [31:29]
  6. Nicholas Zakas: Maintainable JavaScript [47:04]


  1. Douglas Crockford: Level 7: ECMAScript 5: The New Parts [57:18]
  2. Douglas Crockford: Section 8: Programming Style and Your Brain [1:06:45]
  3. Ryan Dahl: Introduction to Node.js [1:06:33]
  4. Alex Russell: Learning to Love JavaScript [1:03:25]


  1. Douglas Crockford: Volume One: The Early Years [1:42:08]
  2. Douglas Crockford: Chapter 2: And Then There Was JavaScript [1:30:22]
  3. Douglas Crockford: Act III: Function the Ultimate [1:13:28]
  4. Douglas Crockford: Episode IV: The Metamorphosis of Ajax [1:33:54]
  5. Douglas Crockford: Part 5: The End of All Things [1:24:42]
  6. Douglas Crockford: Scene 6: Loopage [51:52]


  1. Nicholas Zakas: Scalable JavaScript Application Architecture [52:22]

software review : Mp3DirectCut (free music editor)

Today, I just wanted to edit a MP3 song, cut it short for my dance performance. After doing a lot of research, I found Mp3 Direct cut is a useful tool especially on windows platform for normal users (beginners in sound editing). It is simple, it will show you the song, you can select and delete the portion you do not want and at the end save the file. That’s so simple Winking smile 

Mp3DirectCut is a fast and extensive audio editor and recorder for compressed mp3. You can directly cut, copy, paste or change the volume with no need to decompress your files for audio editing. Using Cue sheets, pause detection or Auto cue you can easily divide long files.


These are some of the features of this program:

  • Editing tools. As well as the classics editing tools, MP3DirectCut enables you to manage the gain level, create fade in/out, and normalize batch processing, among others
  • Non-destructive editing functions. This means that if you do actions like copy, trim, crop or change part of the track, it will not affect the source audio file
  • Useful and easy graphics. Enables visualization of the the bit rate and the timeline in the sound graph. You can make a quick MPEG visualization and work with precision on the wave
  • Unicode supports. Unicode is a standard codification that enables text processing and includes track splitting with autocue or pause detection, as well as the generation or editing of ID3 type tags, specifically ID3v1.1, like filename or music genre.
  • Some functionality. Mp3DirectCut enables fast MP3 recording with the encoder ACM or Lame, and supports AAC and MP3 formats
  • It allows batch processing like the functions Save or Split.
  • The display includes some playback options during the editing process, like Fast Play and Loop Play.

If you want know more about this software before you download it, feel free to check the developer’s website


Mp3DirectCut is a download ideal for those who want a free audio editor. A simple interface, easy-to-use but very useful, this software allows for non-destructive audio editing. Although it basically works with mp3 as a unique format, it has built-in tools for visualization, compression, encoding, recording, batch processing, among others, of your music or audio files.