Skip to content

Instantly share code, notes, and snippets.

✈️
Working from home

Sumit Hingu sphingu

✈️
Working from home
Block or report user

Report or block sphingu

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
@sphingu
sphingu / sublime
Last active Mar 11, 2018
Sublime Things
View sublime
SELECTION
---------
Ctrl + D : select a Word
Ctrl + L : select Line
Ctrl + M : Select whole bracket code
Ctrl + Shift + P : Command Patelle
Ctrl + P : list all files
1) SideBarEnhancements
@sphingu
sphingu / shortcuts
Last active Mar 11, 2018
Elementary OS Shortcuts
View shortcuts
⌘+Space App Launcher
Alt+Tab Window Switcher
⇧+Alt+Tab Switch Windows Backwards
⌘+W Window Overview
⌘+A Window Overview (Across All Workspaces)
⌘+Left/Right Switch Workspace
⌘+S Workspace Overview
⌘+0 New Workspace
⇧+⌘+Left/Right Move Window with Workspace
Ctrl+⌘+Left/Right Snap Window to Half of Workspace
@sphingu
sphingu / EnumExtensions.cs
Last active Feb 16, 2016
Enum Extension
View EnumExtensions.cs
[Flags]
public enum Status
{
Success = 1<<0, //1
Fail = 1<<1, //2
Unknown = 1<<2, //4
isNotFail = Success | Unknown
}
public static bool HasFlag(this int status, int flag)
View npm-cheat-sheet.md

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/:

View nodejs-cheatsheet.js
// 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
@sphingu
sphingu / Index.html
Created Apr 16, 2014
Knockout Custom Pagination
View Index.html
<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 Sep 13, 2015
Knockout CheetSheet.
View KoCheetSheet.yaml
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
View CodeFirst
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 / Configuratoin&RunPhase.html
Created Feb 25, 2014
AngularJsHub.Com Module Example
View Configuratoin&RunPhase.html
<!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 = " ";
@sphingu
sphingu / NestedController.html
Created Feb 25, 2014
AngularJSHub.com Examples Basic
View NestedController.html
<!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>
You can’t perform that action at this time.