Skip to content

Instantly share code, notes, and snippets.

Mithun Patel mithun-daa

Block or report user

Report or block mithun-daa

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
View averageSalary.ts
function averageSalary(employees: Employee[], conditions: Predicate[]): number {
let total = 0;
let count = 0;
employees.forEach((e) => {
if(conditions.every(c => c(e))){
total += e.salary;
count += 1;
View gulp-system-sample.js
//for a dynamically loaded application
// <script src="system.js">
// <script src="system.config.js">
// <script>
// System.import('app');
// </script>
//for a prebuilt app
var Builder = require('systemjs-builder');
btroncone /
Last active Jan 23, 2020
RxJS 5 Operators By Example
jackofseattle / injectable.js
Last active Aug 29, 2015
Basic injectable class for AngularJS
View injectable.js
* injectable
* Provides a constructor to move items from the $inject property to local object members.
* inject = ['$q', '$http'] //translates to
* this.$q
* this.$http
View gist:969e190dcb21d9814c57
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst 1password
cinst 7zip
cinst 7zip.install
cinst AdobeAIR
cinst adobereader
cinst Atom
cinst markdownpad2
lrvick / app.js
Last active Nov 11, 2019
AngularJS credit card form with validation
View app.js
// MIT:
angular.module('app', []);
( 'MainCtrl'
, function($scope,$locale) {
$scope.currentYear = new Date().getFullYear()
$scope.currentMonth = new Date().getMonth() + 1
$scope.months = $locale.DATETIME_FORMATS.MONTH
jelbourn / api-provider.js
Last active Jan 13, 2020
Example of using an angular provider to build an api service. Subject of August 20th 2013 talk at the NYC AngularJS Meetup. in jsbin:
View api-provider.js
* Example of using an angular provider to build an api service.
* @author Jeremy Elbourn (@jelbourn)
/** Namespace for the application. */
var app = {};
azat-co /
Last active Jun 10, 2017
JavaScript FUNdamentals

JS FUNdamentals

If it's not fun, it's not JavaScript.


Programming languages like BASIC, Python, C has boring machine-like nature which requires developers to write extra code that's not directly related to the solution itself. Think about line numbers in BASIC or interfaces, classes and patterns in Java.

On the other hand JavaScript inherits the best traits of pure mathematics, LISP, C# which lead to a great deal of expressiveness (and fun!).

View controllerSpec.js
'use strict';
/* jasmine specs for controllers go here */
/* Define all the services and controllers module, so they are accessable in your it's
describe('controllers', function(){
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
You can’t perform that action at this time.