Skip to content

Instantly share code, notes, and snippets.

View isummation's full-sized avatar

iSummation INC isummation

View GitHub Profile
<cfscript>
emp = new employee();
emp.firstname="Pritesh";
emp.lastname = "Patel";
fullname = emp.getFullname();
</cfscript>
<cfscript>
ws = createObject ("webservice" ,"http://www.webservicex.net/genericbarcode.asmx?WSDL" , { refreshWSDL=true });
arg1 = {
Height = 100,
Width = 100,
Angle = 0,
Ratio = 10,
Module = 1,
Left = 1,
Top = 1,
ws = createObject ("webservice" ,"http://www.webservicex.net/genericbarcode.asmx?WSDL" , { refreshWSDL=true,wsversion= 1 });
<cfoutout>#now()#</cfoutout>
@isummation
isummation / TimeSlot.cfm
Created October 18, 2013 04:10
ColdFusion function for returning time slots
<cfdump var="#TimeSlot(MinuteSlot = 15, CreatedDate = now())#" />
<cfdump var="#TimeSlot(MinuteSlot = 15)#" />
<cffunction name="TimeSlot" output="false" access="public" returntype="any">
<cfargument name="MinuteSlot" type="numeric" required="true">
<cfargument name="CreatedDate" required="false" hint="If it is passed then function will return the time slot of the createdDate">
<cfif 1440 MOD arguments.MinuteSlot NEQ 0>
<cfthrow type="user" message="Invalid Minute slot">
<!-- ADD NEW HOSTS HERE -->
<!-- VIRTUAL HOST -->
<Host name="mysite.local" appBase="webapps">
<Context path="" docBase="C:/mysite.local" />
</Host>
# Main Lucee proxy handler
location ~ \.(cfm|cfml|cfc|jsp|cfr)(.*)$ {
proxy_pass http://127.0.0.1:8888;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
server {
listen 80;
server_name mysite.local;
root C:/mysite.local;
index index.html index.htm index.cfm;
server {
listen 8081;
server_name mynodeapp;
root C:/mynodeapp;
index index.html index.htm;
# Main node proxy handler
location / {
proxy_pass http://127.0.0.1:3000;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;