This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing the virtualbox guest additions | |
VBOX_VERSION=$(cat /etc/vagabond/vbox_version) | |
cd /tmp | |
wget http://download.virtualbox.org/virtualbox/$VBOX_VERSION/VBoxGuestAdditions_$VBOX_VERSION.iso | |
mount -o loop,ro VBoxGuestAdditions_$VBOX_VERSION.iso /mnt | |
sh /mnt/VBoxLinuxAdditions.run --nox11 | |
umount /mnt | |
rm VBoxGuestAdditions_$VBOX_VERSION.iso | |
unset VBOX_VERSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
component output="false" { | |
public googleURL function init(apiKey) | |
description="Initialize this CFC as an object" | |
{ | |
variables.apiKey = arguments.apiKey; | |
return this; | |
} | |
public string function ShortenURL(required string url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfoutput> | |
<div> | |
<form action="#$.content('url')#?keywords=#$.event('keywords')#"> | |
<dl> | |
<dt>Keywords</dt> | |
<dd><input type="text" name="keywords" value="#HTMLEditFormat($.event('keywords'))#" /></dd> | |
<dd><input type="submit" value="Search" /></dd> | |
</dl> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// place this in your Site or Theme eventHandler.cfc, then reload your application! | |
public any function onApplicationLoad($) { | |
arguments.$.getBean('contentUtility').findAndReplace( | |
find='http://olddomain.com' | |
, replace='http://newdomain.com' | |
, siteid=arguments.$.event('siteid') | |
); | |
} | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Drop this in your Site or Theme eventHandler.cfc | |
public any function onBeforeFormSubmitSave($) { | |
// reference to the formBean | |
var formBean = arguments.$.event('formDataBean'); | |
// example on how to create some errors | |
var error = ''; | |
var errors = {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// drop this in your Site or Theme eventHandler.cfc | |
public any function onRenderStart($) { | |
if ( $.event('showMeta') != 2 && $.content().getParent().getValue('type') != 'Folder' ) { | |
$.event('showMeta', 1); | |
} | |
} | |
</cfscript> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Save this file to a path such as /{SiteID}/includes/themes/{ThemeName}/remote/ajaxData.cfc | |
component { | |
remote string function getData(siteid='default', contentid='00000000000000000000000000000000001') returnformat='plain' { | |
var str = ''; | |
var $ = get$(arguments.siteid, arguments.contentid); | |
savecontent variable='str' { | |
WriteOutput("<h1>Hello from ajaxData.cfc</h1> |
OlderNewer