Skip to content

Instantly share code, notes, and snippets.

View JonasEriksson's full-sized avatar

Jonas JonasEriksson

View GitHub Profile
@noelboss
noelboss / git-deployment.md
Last active May 16, 2024 20:41
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@JamieMason
JamieMason / html-languages.txt
Created September 19, 2012 08:50
HTML lang attribute / ISO language code reference / Culture names
CULTURE SPEC.CULTURE ENGLISH NAME
--------------------------------------------------------------
Invariant Language (Invariant Country)
af af-ZA Afrikaans
af-ZA af-ZA Afrikaans (South Africa)
ar ar-SA Arabic
ar-AE ar-AE Arabic (U.A.E.)
ar-BH ar-BH Arabic (Bahrain)
ar-DZ ar-DZ Arabic (Algeria)
ar-EG ar-EG Arabic (Egypt)
@stevewithington
stevewithington / muraImportUsersViaCSV.cfm
Last active January 19, 2024 09:02
Example of how to import Users into Mura CMS via .CSV file. Also see https://gist.github.com/stevewithington/4742829 to import content from an RSS Feed.
<cfscript>
param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv';
param name='form.group' default='Temp';
param name='form.isSubmitted' default='false';
param name='form.isTest' default='true';
param name='form.siteid' default='default';
$ = application.serviceFactory.getBean('$').init(form.siteid);
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) {
@stevewithington
stevewithington / muraImportContentFromRSS.cfm
Last active January 15, 2024 14:29
Mura CMS: Example of how to import content into Mura CMS from an RSS feed. Place the file under your Mura root. For example: http://yourdomain.com/temp/import/index.cfm. Also see https://gist.github.com/stevewithington/5051646 to importUsersViaCSV
<cfscript>
param name='form.rssurl' default='http://www.npr.org/rss/rss.php?id=1014';
param name='form.parentfilename' default='blog';
param name='form.isSubmitted' default='false';
param name='form.istest' default='true';
param name='form.siteid' default='default';
$ = application.serviceFactory.getBean('$').init(form.siteid);
if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) {
@stevewithington
stevewithington / mura-save-external-content.cfm
Last active December 14, 2023 10:19
Mura CMS : How to create content dynamically in Mura. There are two primary pieces to the puzzle: 1) Mura needs to know where to add the content. Specifically, it needs to know the ParentID. 2) Remember, there's only one required field when adding content via the UI, and that's the 'Title' field. To do this dynamically, I usually recommend also …
<cfscript>
// This Gist is very much related directly to https://gist.github.com/stevewithington/4742829 on how to import content via RSS.
// However, this is the main code
content = $.getBean('content').loadBy(remoteid = 'PrimaryKeyFromExternalDB');
content.setTitle('theTitle');
content.setMenuTitle(''); // we clear the other title fields so that Mura will auto-generate them based on the actual 'title'
content.setURLTitle('');
content.setHTMLTitle('');
content.setApproved(1);
content.setIsNav(0);
@stevewithington
stevewithington / muraCustomUI.cfm
Last active December 14, 2023 09:50
Mura CMS: Example of how to use the 'Custom UI' container/tab assignment option when creating a class extension.
<!---
A brief example on how to use the 'CustomUI' option when creating a class extension in Mura CMS.
This example assumes you have an extended attribute called 'Page/Book'.
It also assumes you have an attribute set using the 'CustomUI' container/tab assignment.
Any extended attributes you assign to the attribute set, you are responsible for collecting
that data using your own form fields. Make sure the 'name' and 'id' attributes match the
names you've used when you created the extended attributes! For example, if you have an
extended attribute with a name of 'bookPublisher', make sure you have a form field with an
'id' and 'name' attribute of 'bookPublisher'. Check your casing too!
@dillonchanis
dillonchanis / example.css
Created September 20, 2020 14:44
Tailwind Utility for using gradients with text
@layer utilities {
.text-gradient {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
@JamoCA
JamoCA / WKHTMLTOPDF.cfm
Last active December 16, 2022 04:30
WKHTMLTOPDF ColdFusion Custom Tag - Converts multiple HTML fragments to PDF.
<CFSETTING ENABLECFOUTPUTONLY="Yes">
<!--- 4/2/2015 by SunStar Media http://www.sunstarmedia.com/ --->
<!--- more posts here: https://gamesover2600.tumblr.com/tagged/wkhtmltopdf --->
<CFPARAM NAME="Attributes.wkhtmltopdfEXEPath" DEFAULT="c:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe">
<CFPARAM NAME="Attributes.ShowDebug" DEFAULT="no"><!--- Yes/No Shows inline results. (default = no) --->
<CFPARAM NAME="Attributes.DebugVar" DEFAULT="WKHMLTOPDF_Result" TYPE="variableName"><!--- Variable name w/PDF generation data. Optional --->
<CFPARAM NAME="Attributes.TimeOut" DEFAULT="60" TYPE="integer"><!--- CFExecute Timeout (Default = 60) --->
<CFPARAM NAME="Attributes.HeaderURL" DEFAULT=""><!--- Publicly accessible URL. Optional --->
<!--- TODO: Add HeaderSpacing --->
<cfcomponent output="false" displayname="Spreadsheet Service">
<cffunction name="init" access="public" output="false" returntype="SpreadsheetService">
<cfreturn this />
</cffunction>
<cffunction name="createFromQuery" access="public" output="false" returntype="void">
<cfargument name="data" type="query" required="true" />
<cfargument name="xlsx" type="boolean" required="false" default="false" hint="File extension is xlsx (true) or xls (false)." />
<cfargument name="fileName" type="string" required="false" default="" hint="Final file name sent to the browser." />
<cfset var config = {
@babbitt
babbitt / tw-hidden-submenu.md
Last active September 26, 2022 18:36
Tailwind hidden submenu with reveal on hover/focus

Tailwind hidden submenu with reveal on hover/focus

                      //////                      
                   ////////////        /////      Created @ Fairly
                //////////////////,    /////      Dev: @babbitt
             /////////.    ./////////, /////      Released: 1/25/2021
          /////////.          ./////////////      License: MIT
       /////////,                .//////////      
      ///////,                      ,///////      
 ////// //////