This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Javascript style guide | |
* Use jshint | |
* indent with tabs (that way people can adjust the spacing and retain alignment) | |
* blank lines and white space is a good thing and aids readability. | |
* code CAN have appropriate comments. When using sourcecontroll code shouldnt | |
* be commented out, implement or remove (YAGNI/DRY) | |
* | |
* N.B. These are just MY recomendations for readability, performance and maintainability. | |
* Ultimately consistancy is the main goal in a javascript style guide. | |
* *************************************************************************************** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Plugin management via Vundle | |
" git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
" | |
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Mini style guide for require.js modules | |
* Dependencies should each have a new line, indented from the array literal (square brackets) | |
* having them on each line means its easy to see the number of dependencies you have. | |
* The function names (exposed by your dependencies) should also be declared on a new line, | |
* this makes it really easy to add new modules at a later time and its quick to check against | |
* your dependencies list. | |
* They should also be prefixed (i.e. $someModule) so that they are very easily identified as modules | |
* when used in your code. (Dependent on module size, this might not be required in smaller modules) | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.info( | |
'%cSome content to log, | |
'background: #B3E8B4; color: #4A5249;font-weight:700;border-radius:2px;padding:1px 2px;border:1px solid #999;' | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ignores everything in wp-content except plugins and themes (this means uploads wont be checked in) | |
wp-content/* | |
!wp-content/plugins/ | |
!wp-content/themes/ | |
# Ignore everything in the "plugins" directory, except the plugins you declare | |
#Allows only plugins needed to make the site work to be stored in source control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = "This is my string"; | |
$firstTwo = substr($string, 0, 2); // first 2 letters of $string | |
$lastTwo = substr($string, -2); // last 2 letters of $string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myArray = [1, 2, 3, 1, 6, 3, 7, 2, 1]; | |
myArray.filter(function(elem, pos, self) { | |
return self.indexOf(elem) == pos; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sass: { | |
dist: { | |
options: { | |
style: 'compressed' | |
}, | |
files: { | |
'css/main.css': 'css/main.scss' // css to create : scss the css is created from | |
} |
NewerOlder