Skip to content

Instantly share code, notes, and snippets.

Dan Smith dansmith65

  • B.C. Canada
Block or report user

Report or block dansmith65

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dansmith65
dansmith65 / #SanitizeName.fmfn
Created May 12, 2014
FileMaker Custom function: Remove characters that are not valid for use in a Let() variable name.
View #SanitizeName.fmfn
/**
* ============================================================================
* #SanitizeName ( name )
*
* PURPOSE:
* Remove characters that are not valid for use in a Let() variable name.
*
* RETURNS:
* Text that is a valid Let() variable name, if an error occurs, the original text is returned.
*
@dansmith65
dansmith65 / RowContainingValue.fmfn
Created Jan 16, 2015
RowContainingValue ( data ; firstColumnValue ; columnSeparator ; rowSeparator )
View RowContainingValue.fmfn
/**
* =====================================
* RowContainingValue ( data ; firstColumnValue ; columnSeparator ; rowSeparator )
*
* RETURNS:
* First row from an array of data where the first columns value matches.
* WITHOUT trailing column separator.
*
* PARAMETERS:
* data: array of data with single characters delimiting columns/rows
@dansmith65
dansmith65 / #.fmfn
Created Mar 18, 2015
in-progress version of # custom function for FileMaker
View #.fmfn
/**
* =====================================
* # ( name ; value )
*
* RETURNS:
* An name-value pair in Let notation.
*
* PARAMETERS:
* name: The name for the returned name-value pair. name can be any value
* that would be a valid Let() variable name.
@dansmith65
dansmith65 / VerifyVariablesNotEmpty.fmfn
Created Mar 23, 2015
test version of VerifyVariablesNotEmpty custom function for FileMaker
View VerifyVariablesNotEmpty.fmfn
/**
* =====================================
* VerifyVariablesNotEmpty ( nameList )
*
* RETURNS:
* True (1) if a locally scoped $variable matching each value in nameList
* is not empty; False (0) otherwise.
*
* PARAMETERS:
* nameList: A return-limited list of names to check. Names do not need to
@dansmith65
dansmith65 / XPath Parse With Namespace.java
Last active Dec 20, 2015
ScriptMaster function, for use in a FileMaker plug-in.
View XPath Parse With Namespace.java
// XPathParseWithNamespace ( someXML ; xpathQuery ; namespaceList )
// adapted from this code: http://www.java2s.com/Code/Java/XML/implementsNamespaceContext.htm
// and the prior XPath Parse function in ScriptMaster
import javax.xml.XMLConstants;
import javax.xml.namespace.NamespaceContext;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
@dansmith65
dansmith65 / GetDelimitedValue.fmfn
Last active Dec 29, 2015
In FileMaker, return value in specified location of delimited text.
View GetDelimitedValue.fmfn
/**
* =====================================
* GetDelimitedValue ( text ; delimiter ; occurrence )
*
* RETURNS:
* Value in specified location of delimited text.
*
* PARAMETERS:
* text = (text) delimited data
* delimiter = (text) single character used to separate values
@dansmith65
dansmith65 / ListContains.fmfn
Created Jan 4, 2014
FileMaker Custom Function: ListContains ( ValueList ; ValuesToTestExistence )
View ListContains.fmfn
/* ListContains ( ValueList ; ValuesToTestExistence )
PURPOSE:
Test if all specified values exist in a list.
PARAMETERS:
ValueList (text) values to search in
ValuesToTestExistence (text) value(s) to search for
RETURNS:
@dansmith65
dansmith65 / VirtualBoxFixNIC.cmd
Created Dec 13, 2013
Fix issue with VirtualBox Host-Only Network adapter in Windows by adding *NdisDeviceType=1 to registry.
View VirtualBoxFixNIC.cmd
@ECHO OFF
ECHO.-------------------------------------------------------------------------------
ECHO.
ECHO. VirtualBoxFixNIC.cmd
ECHO.
ECHO. Created on 2013-DEC-13 by Dan Smith http://scr.im/dansmith
ECHO.
ECHO. Fix issue with VirtualBox Host-Only Network adapter in Windows by adding
ECHO. *NdisDeviceType=1 to registry.
ECHO.
@dansmith65
dansmith65 / ExecuteSQL
Last active Apr 2, 2018
ExecuteSQL template for FileMaker which allows for viewing the query in the data viewer while debugging, and testing for an error.
View ExecuteSQL
Let ( [
$sqlQuery =
"SELECT "
& SQLTableAndField ( field )
& "¶FROM "
& SQLTable ( field )
& "¶LEFT JOIN "
& SQLTable ( field )
& "¶ON "
& SQLTableAndField ( field )
@dansmith65
dansmith65 / Get-TodoistBackup.ps1
Created May 17, 2016
Powershell script to download the latest backup from Todoist
View Get-TodoistBackup.ps1
# Get-TodoistBackup.ps1
# Created By: Daniel Smith dan@dansmith65.com
#
# Download the latest backup from Todoist
#
$token = ""
# get list of backups from Todoist
You can’t perform that action at this time.