Skip to content

Instantly share code, notes, and snippets.

View oraculum's full-sized avatar

Damon Abdiel oraculum

View GitHub Profile
@richardkundl
richardkundl / Common-isEmpty.js
Last active December 20, 2022 20:06
Javascript is empty function
// Current value is empty
this.isEmpty = function(value){
return value == null // NULL value
|| value == undefined // undefined
|| value == 'undefined' // undefined
|| value.length == 0 // Array is empty
|| value == '00000000-0000-0000-0000-000000000000' // Guid empty
|| ((value instanceof Date && !isNaN(value.valueOf())) // Validate DateTime value and check min-max value
&& ((value <= new Date(1753, 01, 01)) // SQL DateTime minimum value
|| (value >= new Date(9999, 12, 31, 23, 59, 59, 999))) // SQL DateTime maximum value
@zmilojko
zmilojko / setup.nsi
Created July 25, 2012 06:48
NSIS package for a C# application - a package file I used in Zaws, with comments on how to use it for your own application
; Full script for making an NSIS installation package for .NET programs,
; Allows installing and uninstalling programs on Windows environment, and unlike the package system
; integrated with Visual Studio, this one does not suck.
;To use this script:
; 1. Download NSIS (http://nsis.sourceforge.net/Download) and install
; 2. Save this script to your project and edit it to include files you want - and display text you want
; 3. Add something like the following into your post-build script (maybe only for Release configuration)
; "$(DevEnvDir)..\..\..\NSIS\makensis.exe" "$(ProjectDir)Setup\setup.nsi"
; 4. Build your project.