Skip to content

Instantly share code, notes, and snippets.

View princeppy's full-sized avatar

👑 Prince Park 👑 princeppy

View GitHub Profile
@princeppy
princeppy / DIS Attendance v2.markdown
Last active August 29, 2015 14:23
DIS Attendance v2
@princeppy
princeppy / Logging_Functions.ps1
Created June 20, 2016 13:53 — forked from 9to5IT/Logging_Functions.ps1
PowerShell: Logging Functions
Function Log-Start{
<#
.SYNOPSIS
Creates log file
.DESCRIPTION
Creates log file with path and name that is passed. Checks if log file exists, and if it does deletes it and creates a new one.
Once created, writes initial logging data
.PARAMETER LogPath

How To: Setting up ASPNetZero With Modular Application

Preparing AspNetZero Project

  1. Create a github repo "jpy-d360"

    clone the above create repo to working directory

  2. Get the latest version of AspNetZero Binary

    Company name : "JPY" Project name : "Zero"

@princeppy
princeppy / host-named-sites.ps1
Created April 13, 2017 19:54 — forked from wpsmith/host-named-sites.ps1
Powershell: SharePoint 2013 Create Web Application, Root Site Collection,
# Replace:
# DATABASE
# NAMED
# APPLICATION NAME
# hostheadername
# DOMAIN\USER
# DOMAIN\SP_FARM_ACCOUNT
# PATHNAME
# SITE COLLECTION NAME
# DIRECTORYPORT
@princeppy
princeppy / Interesting npm and bower libraries.md
Last active July 18, 2017 23:26
How to update npm, bower and gulp

Awesome Libraries

    • Gulp: The Gulp tool. gulp
    • Gulp Load Plugins: Automatically Load Gulp Plugins with gulp-load-plugins gulp-load-plugins
    • Gulp Concat: A package for concatenating files in Gulp gulp-concat
    • Gulp Clean CSS: A package for minifying CSS files in Gulp -clean-css
    • Gulp Uglify: A package for minifying JS files in Gulp lify
    • Gulp Filter: Enables you to work on a subset of the original files by filtering them using glob patterns gulp-filter
    • Gulp Bower: A package used to install Bower packagesin Gulp gulp-bower
    • Gulp Rename: A package for simple file renaming in Gulp gulp-rename
    • Live Server: Simple HTTP Server for testing our web app live-server
@princeppy
princeppy / IE CSS Conditionals
Created July 21, 2017 09:01 — forked from fauverism/IE CSS Conditionals
IE CSS Conditionals
Target ALL VERSIONS of IE
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->
Target everything EXCEPT IE
<!--[if !IE]><!-->
<link rel="stylesheet" type="text/css" href="not-ie.css" />
Function Get-AgeAndGender()
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string] $ImagePath
)
$Splat = @{
@princeppy
princeppy / dataURItoBlob.js
Created November 8, 2017 05:08 — forked from davoclavo/dataURItoBlob.js
Convert dataURI to Blob so large images do not crash the browser. Based on: http://stackoverflow.com/questions/10412299 and http://stackoverflow.com/questions/6850276
/*
The MIT License (MIT)
Copyright (c) 2016 David Gomez-Urquiza
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION

How To: Setting up ASPNetZero With Modular Application

Preparing AspNetZero Project

  1. Create a github repo "jpy-d360"

    clone the above create repo to working directory

  2. Get the latest version of AspNetZero Binary

    Company name : "JPY" Project name : "Zero"

I Call It as BinaryFlagedEnums

Imagin that you have a class like this
class User {
    .....
    .....
    bool CanDelete;