Skip to content

Instantly share code, notes, and snippets.

View sphingu's full-sized avatar
:dependabot:
Focusing

Sumit Hingu sphingu

:dependabot:
Focusing
View GitHub Profile
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html

Node.js - npm Cheat Sheet

(Full description and list of commands at - https://npmjs.org/doc/index.html)

##List of less common (however useful) NPM commands

######Prepand ./bin to your $PATH Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:

@sphingu
sphingu / Index.html
Created April 16, 2014 13:01
Knockout Custom Pagination
<div id="body">
<section class="content-wrapper main-content clear-fix" data-bind="with: personList" style="margin-top: 30px;">
<table>
<thead>
<tr>
<td>First Name</td>
<td>Last Name</td>
<td>Age</td>
</tr>
</thead>
@sphingu
sphingu / KoCheetSheet.yaml
Last active September 13, 2015 10:50
Knockout CheetSheet.
Controlling Text and appearance
Visible visible: hasError
Text text: message
Html html: markup
CSS css: { error: hasError, required: isRequired }
Style style: { color: messageColor, backgroundColor: backColor }
Attr attr: { title: itemDescription, id: itemId }
Form Field Binding
@sphingu
sphingu / DateTime.cshtml
Last active September 13, 2015 17:22
Display Templates & Editor Templates in MVC
//EditorTEmplated in Shred FOlder
@{
string name = ViewData.TemplateInfo.HtmlFieldPrefix;
string id = name.Replace(".", "_");
string value = "";
if (Model != null) { value = Model.ToShortDateString(); }
}
<input type="text" id="@id" class="txt" value="@value" />
<script type="text/ecmascript">
@sphingu
sphingu / FirstAngularApp.html
Created February 18, 2014 11:56
FirstAngularApp
<html ng-app >
<head>
<title>First Application</title>
<!--<script type="text/javascript" src="jquery-1.10.2.js"></script>-->
<script type="text/javascript" src="angular.min.js"></script>
<script type="text/javascript">
function AlbumController($scope) {
$scope.images = [
{ "thumbnail": "img/1.png", "description": "Bootstrap MVC" },
{ "thumbnail": "img/2.png", "description": "Happy Holiday" }
@sphingu
sphingu / NestedController.html
Created February 25, 2014 04:46
AngularJSHub.com Examples Basic
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8" />
<title>Nested Controller</title>
<script src="angular.min.js"></script>
<script src="nestedScript.js"></script>
</head>
<body>
@sphingu
sphingu / Configuratoin&RunPhase.html
Created February 25, 2014 06:38
AngularJsHub.Com Module Example
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>Configuration and Run phases</title>
<script src="angular.min.js"></script>
<script type="text/javascript">
var PersonManager = function () {
var fullNameSeparator = " ";
public class LibraryContext : DbContext
{
public LibraryContext()
: base("name=DbConnectionString")
{ }
public DbSet<Publisher> Publishers { get; set; }
public DbSet<Book> Books { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
@sphingu
sphingu / App.xaml
Last active December 18, 2015 12:10
Processbar Style in WPF
// App.xaml in Root folder of project
<Application>
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/ProcessStyle.xaml"/>
</ResourceDictionary.mergedDictionaries>
</ResourceDictionary>
</Application.Resources>