Source: https://github.com/stevekwan/best-practices/blob/master/README.md
Standards and best practices guides for various front-end technologies.
Author:
Steve Kwan, Project Lead, EASPORTS.com
Electronic Arts
Open Terminal. | |
Type this command: | |
cd /System/Library/CoreServices/Finder.app/Contents/Resources/English.lproj/ | |
Now, the file we want to mess around is the InfoPlist.strings. But unfortunately, this file cannot be edited directly using text editor in Lion. But no worries. Run this command to make it editable. | |
sudo plutil -convert xml1 InfoPlist.strings | |
Now the file should be editable and readable. Use your favorite text editor and open InfoPlist.strings. I just used vim | |
sudo vim InfoPlist.strings |
<?php | |
// include this near the top of your plugin file | |
$my_plugin_file = __FILE__; | |
if (isset($plugin)) { | |
$my_plugin_file = $plugin; | |
} | |
else if (isset($mu_plugin)) { |
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Author: Ola Sitarska <[email protected]> | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
""" | |
import re, ez_epub, urllib2, genshi |
'rewrite' => true | |
'public' => true 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine | |
'public' => false 'publicly_queryable' => true /cpt-slug/cpt-post-slug Loads fine | |
'public' => true 'publicly_queryable' => false /cpt-slug/cpt-post-slug 404 Error | |
'public' => false 'publicly_queryable' => true /cpt-slug-cpt-post-slug 404 Error | |
'rewrite' => false | |
'public' => true 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine | |
'public' => true 'publicly_queryable' => true /?p=ID&post_type=cpt-slug Loads fine | |
'public' => false 'publicly_queryable' => true /?cpt-slug=cpt-post-slug Loads fine |
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Author: Ola Sitarska <[email protected]> | |
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
""" |
Source: https://github.com/stevekwan/best-practices/blob/master/README.md
Standards and best practices guides for various front-end technologies.
Author:
Steve Kwan, Project Lead, EASPORTS.com
Electronic Arts
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
#!/usr/bin/env bash | |
set -e | |
function echo_color() { | |
# Some colors: | |
# 0-black, 1-red, 3-yellow, 76-green, 26 or 27-blue, 237-grey, 255-white | |
local background='' | |
local foreground='' |
#!/usr/bin/env bash | |
set -e | |
function echo_color() { | |
# Some colors: | |
# 0-black, 1-red, 3-yellow, 76-green, 26 or 27-blue, 237-grey, 255-white | |
local background='' | |
local foreground='' |