Skip to content

Instantly share code, notes, and snippets.

@petrowsky
petrowsky / FileMaker Keywords
Created August 3, 2012 01:04
FileMaker Keywords
// evaluate within data viewer - add any missing keywords
List(
Plain & " Plain";
Strikethrough & " Strikethrough";
SmallCaps & " SmallCaps";
Superscript & " Superscript";
Subscript & " Subscript";
Symbol & " Symbol";
Other & " Other";
Let ( [
~tab = Char ( 9 );
~lineFeed = Char ( 10 );
~verticalTab = Char ( 11 );
~formFeed = Char ( 12 );
~string = ~tab & ~lineFeed & ~verticalTab & ~formFeed
&" This text has both leading and trailing white space characters "
& ~tab & ~lineFeed & ~verticalTab & ~formFeed
];
TextFormatRemove ( MiddleWords ( ~string ; 1 ; Length ( ~string ) ) )
<?php
$theArray = array (
'Order_id' => 'mystore-12656',
'Currency' => 'USD',
'Time' => 'Fri Apr 6 10:46:57 2012 GMT',
'NumericTime' => '1390972125',
'IPAddress' => '127.0.0.1',
'Bill_First' => 'Tësting',
'Bill_Last' => 'Persøn',
chart.selectAll("rect")
.data(counts)
.enter().append("rect")
.attr("id", function (d, i) {return keys[i];})
.attr("x", legendWidth)
.attr("y", function (d, i) {return i * bar_height;})
.attr("width", x)
.attr("height", bar_height - gap)
.attr("fill", "url(#gradient)")
.on("click", fmpurl);
<pre>
\foo
\\bar
"\foo¶\\\bar"
"\"\foo\¶\\\\\bar\""
"\"\\\"\foo\\\¶\\\\\\\\\bar\\\"\""
"\"\\\"\\\\\\\"\foo\\\\\\\¶\\\\\\\\\\\\\\\\\bar\\\\\\\"\\\"\""
"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\foo\\\\\\\\\\\\\\\¶\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\bar\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""
"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\foo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\¶\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\bar\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""
@petrowsky
petrowsky / boa websh
Created January 5, 2015 18:53
boa websh
#!/bin/bash
export PATH=$PATH:/opt/local/bin
_ALL="$@"
_LTD_GID=$(id -nG $USER)
_INTERNAL=NO
_X_USR=".*"
if [ "$USER" = "aegir" ] || [ "$HOME" = "/var/aegir" ] ; then
_Y_USR=aegir
else
@petrowsky
petrowsky / boa conf
Created January 5, 2015 19:41
boa conf
---------------
.barracuda.cnf
---------------
###
### Configuration created on 121114-1723
### with Barracuda version BOA-2.0.4
###
### NOTE: the group of settings displayed bellow will *not* be overriden
### on upgrade by the Barracuda script nor by this configuration file.
### They can be defined only on initial Barracuda install.
---------------
.barracuda.cnf
---------------
###
### Configuration created on 150112-1253
### with Barracuda version BOA-2.3.8
###
### NOTE: the group of settings displayed below will *not* be overridden
### on upgrade by the Barracuda script nor by this configuration file.
### They can be defined only on initial Barracuda install.
@petrowsky
petrowsky / gist:2089f07e7a49a53e8fee
Created February 12, 2015 05:13
PythonWrapText Custom Function - FileMaker
/*
* PythonWrapText ( text ; columns ; prefix )
*
* A bBox plugin function for wrapping text.
* http://www.beezwax.net/download/bbox
*
*/
Let ( [
~script = List (
Let ( [
~now = Get ( CurrentTimestamp );
~useTimeStamp = Get ( ActiveModifierKeys ) = 8 or Get ( ActiveModifierKeys ) = 10;
~registered = MBS ( "Register"; "Name Here"; "Complete"; "5 seats" ; 201601 ; -12831001) = "OK";
~targetFolder = MBS ( "Folders.UserDesktop" )
& "/DDR/"
& Filter ( Get ( FileName ) ; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklomnopqrstuvwxyz1234567890" )
& If ( ~useTimeStamp ;
"_" & Year ( ~now )
& "-" & Right ( "0" & Month ( ~now ) ; 2 )