Skip to content

Instantly share code, notes, and snippets.

View JasPanesar's full-sized avatar

Jas Panesar JasPanesar

View GitHub Profile
@JasPanesar
JasPanesar / EditProfileSnippet
Created October 11, 2014 15:49
Show Edit Profile and Logout Link in NavBar in a theme in Mura CMS
<!--- insert this in navbar.cfm in the appropriate place inside the MuraBootstrap theme to see an Edit Profile or Logout link if a user is logged in.
This example also outputs the users name into the nav bar. --->
<cfif $.currentuser().isLoggedIn()>
<div class="pull-right">
#$.currentUser().getFname()# #$.currentUser().getLname()#&nbsp;&nbsp;&nbsp;
<a href="/?display=editprofile" class="btn btn-default">Edit Profile</a>&nbsp;
<a href="/?doaction=logout" class="btn btn-default">Logout</a>
</div>
@JasPanesar
JasPanesar / cfstart.sh
Created January 3, 2014 21:29
cfstart.sh - simple example script to start ColdFusion 9 from the command line. This has been written for OSX but you should be able to adapt it to yours. If you change the 9 to 10 for CF 10 and it should work. Also, you may need to run chmod +x cfstart.sh to make it executable. I normally store this in my home directory ~/
/Applications/ColdFusion9/bin/coldfusion start
@JasPanesar
JasPanesar / railostart.sh
Created January 3, 2014 21:25
railostart.sh - simple bash script to launch railo from the Mac OS X command line. This will launch a window called org.apache.catalina.startup.Bootstrap which contains railo. If you need to reboot, simply quit that and restart it. I normally place this in my local home so I can call if if need be ~/
sudo /usr/share/railo/tomcat/bin/catalina.sh start
@JasPanesar
JasPanesar / Drop-Mura-Tables-MSSQL
Created June 25, 2013 17:10
Quick Script to drop all Mura CMS 6.0 tables from a MS SQL Server. Copy, paste, and rename the Use statement to reference your Mura TableName.
/* MSSQL Script to delete Mura 6.0 installation tables
Be sure to replace your database name below inside the USE [] Statement */
USE [MyMuraDatabase]
GO
DROP TABLE [dbo].[tadcampaigns]
DROP TABLE [dbo].[tadcreatives]
DROP TABLE [dbo].[tadipwhitelist]
curl https://api.mover.io/account/limits \
-X GET \
-H "Authorization: MoverAPI app_id=2tsc0f9n9l4v209oara0mb2j5ur9my8v app_secret=65oow347p1q7d0loj45oje2u3sol99xd" \
@JasPanesar
JasPanesar / CFPdf-Page-Count.cfm
Created August 23, 2012 15:39
How to retrieve total page count from a PDF in CFML or CFSCRIPT
Using CFSCRIPT
pdfService = new pdf();
pdfService.setSource( expandpath( './#mypdf#.pdf' ) );
PDFInfo = pdfService.getPdfInfo( name = "pdfinfo" );
pageCount = PDFInfo.TotalPages;
From: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_02.html