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 ng2_dnd_todolist.js
onDrop(src: Todo, trg: Todo) {
this._moveRow(src.order, trg.order);
_moveRow(src, trg) {
src = parseInt(src);
trg = parseInt(trg);
// If the element was moved down
if (src > trg) {
View ng2_dnd_todolist.html
 <todo *ngFor=”let todo of todos” [todo]=”todo” [makeDraggable]=”todo” makeDroppable (dropped)=”onDrop($event, todo)”></todo>
View ng2_dnd_makeDroppabel.js
selector: '[makeDroppable]'
export class MakeDroppable implements OnInit {
@Output() dropped: EventEmitter<any> = new EventEmitter();
constructor(private _elementRef: ElementRef) {}
ngOnInit() {
let el = this._elementRef.nativeElement;
View ng2_dnd_makeDraggable.js
selector: '[makeDraggable]'
export class MakeDraggable {
@Input('makeDraggable') data: any;
constructor(private _elementRef: ElementRef) {}
ngOnInit() {
// Get the current element
mithun-daa / server.js
Created Feb 20, 2015
Authenticating a Node application using Thinktecture Identity Server v2
View server.js
var express = require('express'),
app = express(),
bodyParser = require('body-parser'),
cookieParser = require('cookie-parser'),
session = require('express-session'),
passport = require('passport'),
wsfedsaml2 = require('passport-wsfed-saml2').Strategy;
passport.use('wsfed-saml2', new wsfedsaml2({
realm: 'urn:node:app',
View gist:170822fe46116879d9f9
echo "installing binaries..."
brew install ${binaries[@]}
mithun-daa / branches
Created Dec 19, 2011
Commited new/updated files to git
View branches
#new branch
git checkout -b <branchname>
#switch back to master
git checkout master
You can’t perform that action at this time.