grunt.js

Screencast #130 (by Chris Coyier): First Few Minutes with Grunt Gruntfile.js sample with: concat, uglify, cssmin, imagemin: Grunt for People Who Think Things Like Grunt are Weird and Hard - by Chris Coyier (shorter version) Front-end developers are often told to do certain things: Work in as small chunks of CSS and JavaScript as makes ... Read more

Sass

SCSS (Sassy CSS) is Sass version 3. Sass gives variables, mixins, nesting and selector inheritance. "The new main syntax" for Sass builds on the existing syntax of CSS. It uses brackets and semi-colons just like CSS. It doesn't care about indentation levels or white-space. In fact, Sass's SCSS syntax is a superset of CSS -- ... Read more

JavaScript closure

I'm a big fan of analogy and metaphor when explaining difficult concepts, so let me try my hand with a story. Once upon a time: There was a princess... function princess(){ She lived in a wonderful world full of adventures. She met her Prince Charming, rode around her world on a unicorn, battled dragons, encountered ... Read more

naming in programming

Class and Method Naming Class name should be a noun (User, Post). Method name should be a verb (create, activate). Class names should always start with an uppercase letter. Variable Names Variables should contain only lowercase letters, and be reasonably named to indicate their purpose and contents. Very short, non-word variables should only be used ... Read more

php quotes

Always use single quoted strings unless you need variables parsed, and in cases where you do need variables parsed, use braces to prevent greedy token parsing. You may also use double-quoted strings if the string contains single quotes, so you do not have to use escape characters.

php anonymous functions

Anonymous functions are available from PHP 5.3 (2009). Anonymous functions are useful when using functions that require a callback function like array_filter or array_map do: Otherwise you would need to define a function that you possibly only use once: The lambda function is an anonymous PHP function that can be stored in a variable and ... Read more

WordPress clean up

Sometimes the wp_options table can get really big and bloated. This could be related to poorly written WP plugins or either tons of _transient entries left in the database. Transient entries are usually created to simply store cached information. This is solved with such sql: Or check the number of not needed records with such ... Read more

dolphin

The Cove - A Documentary Film (2009) Japan Taiji dolphin slaughter save Japan dolphins Dolphins gain unprecedented protection in India India has officially recognized dolphins as non-human persons, whose rights to life and liberty must be respected. Dolphin parks that were being built across the country will instead be shut down. India's Ministry of Environment ... Read more

facebook

The Facebook experiment has failed. Let’s go back. I am signed into Facebook right now. At a quick glance, the entire list of posts on the first screen are irrelevant to me. If I scrolled down I can find 4 stories I actually care about, from a list of about 30. The most important page ... Read more