This file contains 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
XML parsing does not support entity. is XHTML entity. If we parse the html or xml or html as xml then you get "Undefined entity" error in firefox error console. To make it working use unicode of (non-breakibg space character)   or simply put space (" " or  ). | |
for example : | |
<div> hello I am going to break. If you are going to use xml parser :( </div> | |
Corrected as : | |
<div>   hello I am going to break. If you are going to use xml parser :( </div> |
This file contains 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
# we can change the <wbr> and <br> as per our requirement. | |
def wrap_long_string(text, max_width = 20) | |
if text.blank? | |
return text | |
end | |
sp = text.split(/\n/) | |
sp.collect!{|s| | |
s = (s.length < max_width) ? s : s.scan(/.{1,#{max_width}}/).join("<wbr>") | |
} |
This file contains 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
Alignment | |
Terminal | |
DocBlocker | |
Emmet | |
trimmer | |
csscomb | |
Color Highlighter | |
jsFormat | |
plainTask | |
AllAutocomplete |
This file contains 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
We are following some standard to make our code same on all machine irrespective of different developers working on different machine, editors and with their different opinion for coding (smile). | |
Help us to make it clean and uniform code base throughout the project. | |
JS Standards | |
Variable and Function naming | |
All name should be CamelCase (start with small case) like `userPassword` | |
Boolean flag should be start with `is`, `has` etc. It will give notion that it will be true/false or yes/no. | |
For count or number variable good to use `no`, `count` | |
Use getter and setters if you are setting some value or getting some value |
This file contains 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
For a web project we can setup following environment to build our app. | |
a) Development/Demo - This environment/stage will be get deployed on every changes pushed on `develop` branch. (Automated Build+deploy) | |
b) Release/QA - This environment will be get deployed once we create a release branch in the repository. (Manually build + deploy from TC `run` button) | |
c) Live - This environment will be deployed mannually from TeamCity by choosing the corrrect release branch to deploy on Live server. (Mannually) | |
For setting up the `development` and `release` environemnt on TC is simillar except the pointing the branch name. | |
We have followed few convension to give name to the applications on while setting up and it is pointed with the respective step. | |
TC Setup |
This file contains 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
Here is a small template to fill while reporting the bug. There is possibility few fields are already present with JIRA tickets like `attachements`. Its good to fill or use those fields. | |
URL | |
https://myawesomeapp.com?id=545924 | |
UserAgent | |
Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36 | |
Steps to reproduce the problem | |
Open the website and web page on xyz browser | |
Click on `save` button |
This file contains 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
For more info about SCSS-Lint, please check this out - | |
About SCSS-Lint | |
SCSS-Lint default settings | |
# Default application configuration that all configurations inherit from. | |
linters: | |
BorderZero: | |
enabled: true | |
convention: none |
This file contains 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
{ | |
"bitwise": true, | |
"camelcase": true, | |
"curly": true, | |
"eqeqeq": true, | |
"eqnull": true, | |
"forin": false, | |
"freeze": false, | |
"immed": true, | |
"indent": 2, |
This file contains 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
/** | |
* Sort an array of object. | |
*/ | |
var sample = [ | |
{ name: 'Ram', age: 21 }, | |
{ name: 'Shyam', age: 37 }, | |
{ name: 'Gyan', age: 45 } | |
]; | |
sample.sort(function(a,b) { |
This file contains 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
/** | |
* Function to flatten the deep array | |
*/ | |
var sampleArray = [[1, 2],[3, 4, 5], [6, 7, 8, 9]]; | |
// Solution for single level nested array | |
[].concat.apply([], sampleArray); | |
// If we want deep flatten then we can use recursive function strategy |