Skip to content

Instantly share code, notes, and snippets.

@kdarty
kdarty / visual-studio-code-tips-and-tricks.md
Last active March 2, 2017 17:50
This is a running list of Tips and Tricks for Visual Studio Code.
@kdarty
kdarty / getting-started-with-angular2.md
Last active May 4, 2017 19:22
This is a Quickstart Guide for setting up multiple Development Environments for building Angular 2 Projects.I will be updating this as I go so consider it a Work in Progress at this point.

Getting Started with Angular 2

This is intended to be an extremely Quick Start guide to getting up and running building Angular 2 applications.

This will not be a guide explaining syntax or much of any core constructs but simply how to get started, focusing on setting up your Development Environment. We will be looking at all the most popular Development Environments to give you a good idea how to get started no matter what you are using.

First Things First: Are You Ready For This?

While I would love to just jump in, if you have never worked with Node or used any npm packages then we need to get our machine in order before going any further.

@kdarty
kdarty / sublime-text-osx-context-menu.md
Created February 18, 2017 19:50 — forked from vincentmac/sublime-text-osx-context-menu.md
Sublime Text OSX Context Menu

Add Sublime Text to OS X Context Menu

  • Open Automator
  • Create a new Service
  • Add a Run Shell Script action
  • Set input to Service receives selected files or folders in any application
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@
  • Set Pass input to as arguments
  • Save as Open in Sublime Text
@kdarty
kdarty / Bootstrap-Articles-Tips-and-Tutorials.md
Created January 12, 2017 15:29
Bootstrap Articles, Tips and Tutorials
@kdarty
kdarty / Activate-Deactivate-SimpleMembership-Users.md
Created December 23, 2016 15:32
Here's a tip for Disabling Users with Simple Membership (Microsoft ASP.NET). The Database for Simple Membership includes an "IsConfirmed". This wasn't really intended for use with disabling/locking a User but can sort of work. A better idea would be to have a Role for "Active" Users.

How to lock/unlock a user in MVC SimpleMembership

Stack Overflow Discussion

I find it easiest to use Roles to do this. Have a ActiveUser role and tag your controllers or actions with a Authorize attribute.

[Authorize(Roles = "ActiveUser")]

Then some simple admin to add or remove users from the role to unlock and lock their access to everything protected with that roles attribute.

@kdarty
kdarty / Learn-To-Code.md
Last active January 20, 2017 16:25
Resources for helping you Learn to Code. Great instructional Websites and Apps to get you started on your journey and to help you move forward no matter what your level of experience may be.

Learn to Code

Online and App Resources

ATTENTION This list is growing more into a full on article and will soon need its own Index. For now it will stay here as a Gist but will move to its own GitHub Repository very soon. An Updated Link will be provided at such time.

Codecademy

@kdarty
kdarty / window-dialog-controls
Last active November 4, 2016 17:22
This is a list of Font Icons that can be used in Web Window/Dialogs for standard Window Controls such as Window Maximize/Restore, Minimize and Close. The examples below are standard Bootstrap Glyph Icons and Font Awesome Icons. While I may add other Window Control styles here, the ones listed below are all intended to mimic what Google uses for …
Google Style Window/Dialog Controls
Expand to full-screen (Maximize)
fa-expand
http://fontawesome.io/icon/expand/
glyphicon glyphicon-resize-full
@kdarty
kdarty / Resync-User-Accounts.sql
Last active October 31, 2016 17:11
With Server Moves and Database Restores from one Database Server to another, it is easy for User Accounts to get "orphaned" where their associated SID (GUID) no longer matches the deployed Server. To fix this, you need to reset or re-sync the Accounts. This is a good solution I found on Stackoverflow which works rather well.
-- Source: http://stackoverflow.com/questions/19009488/the-server-principal-is-not-able-to-access-the-database-under-the-current-securi
USE [your database]
GO
-------- Reset SQL user account guids ---------------------
DECLARE @UserName nvarchar(255)
DECLARE orphanuser_cur cursor for
SELECT UserName = su.name
FROM sysusers su
@kdarty
kdarty / responsive-button-group.html
Created October 20, 2016 19:02
Bootstrap Style Button Group made Responsive slimming down to just Icons on Mobile View. I saw this example in a Stack Overflow discussion and thought it was a pretty nice solution to make sure your Button Groups re-size down gracefully in a fully usable form leaving only the icons in tact for Mobile View.
<!-- Source: http://stackoverflow.com/questions/21988395/bootstrap-3-btn-group-non-responsive-behavior-on-small-screens -->
<!-- Demo: http://jsfiddle.net/Jeen/w33GD/4/ -->
<!-- NOTE: The use of a SPAN Element with the Style Class "hidden-xs" makes it hide for Small Screens -->
<div class="btn-group">
<button class="btn btn-default" title="View"><i class="fa fa-eye"></i><span class="hidden-xs"> View</span></button>
<button class="btn btn-default" title="Delete"><i class="fa fa-times"></i><span class="hidden-xs"> Delete</span></button>
</div>
@kdarty
kdarty / carousel-with-overlay.css
Created September 23, 2016 18:24
This sample code came from Bootsnipp. It provides a sample for how to provide an overlay for Bootstrap Carousel slide images: Bootstrap Carousel with Overlay (Text) http://bootsnipp.com/snippets/6n3Wr