Skip to content

Instantly share code, notes, and snippets.

Amitesh Kumar Amitesh

Block or report user

Report or block Amitesh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Amitesh
Amitesh / Logs.log
Last active May 15, 2018
Steps to create a angular 6 project with lib
View Logs.log
Amiteshs-MacBook-Pro:fiserv amitesh$ ng new simpleNgxDatagrid --directory simple-ngx-datagrid
CREATE simple-ngx-datagrid/README.md (1034 bytes)
CREATE simple-ngx-datagrid/angular.json (3492 bytes)
CREATE simple-ngx-datagrid/package.json (1323 bytes)
CREATE simple-ngx-datagrid/tsconfig.json (384 bytes)
CREATE simple-ngx-datagrid/tslint.json (2805 bytes)
CREATE simple-ngx-datagrid/.editorconfig (245 bytes)
CREATE simple-ngx-datagrid/.gitignore (503 bytes)
CREATE simple-ngx-datagrid/src/environments/environment.prod.ts (51 bytes)
CREATE simple-ngx-datagrid/src/environments/environment.ts (631 bytes)
View pickadate-demo.html
<!doctype html>
<meta charset="utf-8">
<meta name="author" content="Amsul - http://amsul.ca">
<meta name="viewport" content="width=device-width,user-scalable=no">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
View code-standards.html
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
View teamcity-setup.html
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
View a-good-way-to-report-bugs.html
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
View scss-lint.yml
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
View jshint-settings.js
{
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"eqnull": true,
"forin": false,
"freeze": false,
"immed": true,
"indent": 2,
View sort-object-array.js
/**
* Sort an array of object.
*/
var sample = [
{ name: 'Ram', age: 21 },
{ name: 'Shyam', age: 37 },
{ name: 'Gyan', age: 45 }
];
sample.sort(function(a,b) {
@Amitesh
Amitesh / flatten.js
Created Dec 5, 2016
Flatten the deep nested array
View flatten.js
/**
* 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
@Amitesh
Amitesh / gist:85533c34d8f6ca5914d4ce9206836c03
Last active Oct 3, 2016
Create recent application dock item in Mac
View gist:85533c34d8f6ca5914d4ce9206836c03
Create recent application dock item in Mac
defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' && killall Dock
https://discussions.apple.com/thread/3217726?tstart=0
Use smart folder option to create recent filter in sidebar.
You can’t perform that action at this time.