View ComplexIdentityID.sql
DECLARE @T TABLE ( | |
cartID INT NOT NULL | |
) | |
UPDATE | |
UserCart | |
SET | |
dateModified = GETDATE(), | |
isGift = 1 | |
OUTPUT |
View GoogleCDNjQuery.htm
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/overcast/jquery-ui.min.css"> | |
<!--- Grab Google CDN's jQuery, with a protocol relative URL; fall back to local if offline ---> | |
<!--- Load the full jQuery version (ex 1.9.1 not 1.9) so it cached ---> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script> | |
window.jQuery || document.write('<script src="/js/jquery-1.9.1.min.js"><\/script>'); | |
</script> | |
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script> |
View DI1Application.cfc
component { | |
this.name = hash( getCurrentTemplatePath() ); | |
// Do not use datasource attribute in cfquery | |
this.datasource = "myDSN"; | |
this.sessionManagement = true; | |
/** | |
* /model/beans/ contains transient CFC's | |
* All others are singleton CFC's |
View jQuerySelfInvokingAnonymousFunctionTemplate.js
/*global $:false, jQuery:false */ | |
(function($) { | |
"use strict"; | |
$(document).ready(function() { | |
/* js code here */ | |
}); | |
})(jQuery); |
View Application.cfc
component { | |
boolean function onRequestStart( required string targetPage ) { | |
var headers = getHttpRequestData().headers; | |
var origin = ''; | |
var PC = getpagecontext().getresponse(); | |
// Find the Origin of the request | |
if( structKeyExists( headers, 'Origin' ) ) { |
View Preferences.sublime-settings.json
{ | |
"color_scheme": "Packages/User/Espresso Soda.tmTheme", | |
"highlight_line": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"line_padding_bottom": 1, | |
"line_padding_top": 1, | |
"soda_classic_tabs": true, |
View ColdFusionPowerShellSettings.ps1
$pshost = get-host | |
$pswindow = $pshost.ui.rawui | |
$newsize = $pswindow.buffersize | |
$newsize.height = 3000 | |
$newsize.width = 87 | |
$pswindow.buffersize = $newsize | |
$newsize = $pswindow.windowsize | |
$newsize.height = 19 |
View Application Scope Dump.cfm
<cfset pageclass = "allapps"> | |
<cfsetting requesttimeout="1000"> | |
<br> | |
<cfparam name="url.sessdump" default="false"> | |
<cfset Cfapp_list = createObject("java","coldfusion.runtime.ApplicationScopeTracker")> | |
<!--- <cfdump var="#CFAPP_list#"> ---> | |
<cfset appIterator = CFAPP_list.getApplicationKeys() /> | |
<cfset oSession = createObject("java","coldfusion.runtime.SessionTracker")> |
View sortObj.js
/** | |
* Sort JavaScript Object | |
* CF Webtools : Chris Tierney | |
* obj = object to sort | |
* order = 'asc' or 'desc' | |
*/ | |
function sortObj( obj, order ) { | |
"use strict"; | |
var key, |
View gist:5625001
UPDATE Table1 | |
SET (...) | |
WHERE Column1='SomeValue' | |
IF @@ROWCOUNT=0 | |
INSERT INTO Table1 | |
VALUES (...) |
OlderNewer