Skip to content

Instantly share code, notes, and snippets.

@manojjsm
manojjsm / README.md
Created July 21, 2016 13:07 — forked from btroncone/README.md
angular 2 basic counter

angular 2 basic counter

Basic counter in Angular 2.

@manojjsm
manojjsm / authentication.ts
Created July 21, 2016 13:06 — forked from btroncone/authentication.ts
Angular 2 application role access decorator, wrapping built in CanAccess functionality. Prevents view transitions when user roles are not appropriate.
import { Injectable } from 'angular2/core';
import { Storage } from './storage';
import { CurrentUser } from '../interfaces/common';
@Injectable()
export class Authentication{
private _storageService : Storage;
private _userKey : string = "CURRENT_USER";
constructor(storageService : Storage){
@manojjsm
manojjsm / gulpfile.js
Created March 30, 2016 14:56 — forked from jadsalhani/gulpfile.js
Ionic Tutorial
var gulp = require('gulp');
var gutil = require('gulp-util');
var bower = require('bower');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var rename = require('gulp-rename');
var sh = require('shelljs');
var uglify = require('gulp-uglify');
var mainBowerFiles = require('main-bower-files');
@manojjsm
manojjsm / teachers-needed.md
Created January 20, 2016 15:42 — forked from PatrickJS/teachers-needed.md
Workshop Teachers Needed

Looking for workshop teachers to teach on the following topics!

For introductions please tweet @frontendmasters, @1marc or email: marc at FrontendMasters.com. Thanks!

You can propose other topics too.

Published blog post detailing topics and allowed people to vote on priority: 2015 Frontend Masters topic poll

JavaScript

@manojjsm
manojjsm / teachers-needed.md
Created January 20, 2016 15:42 — forked from 1Marc/workshops-planning.md
Workshop Teachers Needed

Looking for workshop teachers to teach on the following topics!

For introductions please tweet @frontendmasters, @1marc or email: marc at FrontendMasters.com. Thanks!

You can propose other topics too.

Published blog post detailing topics and allowed people to vote on priority: 2015 Frontend Masters topic poll

Bolded topics are very highly requested.

@manojjsm
manojjsm / install-teamcity.md
Created December 14, 2015 11:23 — forked from sandcastle/install-teamcity.md
Install TeamCity 9.0.3 on Ubuntu with Nginx
@manojjsm
manojjsm / gist:dfc320a17c68b4541a33
Created November 26, 2015 14:10 — forked from fat/gist:859445
make this better.
function __tailingFn () {
for (var i = arguments.length; i--;) {
if (typeof arguments[i] == 'function') {
var fn = arguments[i];
arguments[i] = undefined;
return fn;
}
}
}
@manojjsm
manojjsm / node-and-npm-in-30-seconds.sh
Created October 22, 2015 11:46 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
@manojjsm
manojjsm / GetJsonDeserializer.cs
Created October 22, 2015 11:45 — forked from gon250/GetJsonDeserializer.cs
Deserialize json example
public RootObject GetJsonDeserializer(string json)
{
try
{
JsonDataSession = (RootObject)JsonConvert.DeserializeObject(json, typeof(RootObject), new JsonSerializerSettings
{
TypeNameHandling = TypeNameHandling.Auto,
NullValueHandling = NullValueHandling.Ignore,
MissingMemberHandling = MissingMemberHandling.Ignore,
Error = (serializer, err) =>
/*global angular: true, google: true, _ : true */
'use strict';
angular.module('geocoder', ['ngStorage']).factory('Geocoder', function ($localStorage, $q, $timeout) {
var locations = $localStorage.locations ? JSON.parse($localStorage.locations) : {};
var queue = [];
// Amount of time (in milliseconds) to pause between each trip to the