Skip to content

Instantly share code, notes, and snippets.

@petrowsky
petrowsky / DevTools_SetVarSteps2JSON.fmfn
Last active July 19, 2024 19:36
DevTools_SetVarSteps2JSON
/*
* DevTools_SetVarSteps2JSON ( option ; dataType )
*
* Quite possibly one of the most valuable functions none of
* your end users will ever use! This one is for you, the developer.
*
* HINT: Copy any number of Set Variable[] script steps to your clipboard
* and use this function within the Data Viewer. Set parameters initially to blank.
*
* @requires: BaseElements plug-in
Let ( [
$$JSON = If ( IsEmpty ( $$JSON );
BE_HTTP_GET ( "https://api.github.com/repos/GoyaPtyLtd/BaseElements-Plugin/commits" );
/*else*/
$$JSON )
];
// BE_JSON_jq ( $$JSON ; "." ; "") // All JSON: dot means "root".
// BE_JSON_jq ( $$JSON ; ".[]" ; "") // Now get the elements of the array.
// BE_JSON_jq ( $$JSON ; ".[2]" ; "") // Just one specific element.
// BE_JSON_jq ( $$JSON ; ".[2:5]" ; "") // Range of elements.
alias ll="ls -l --group-directories-first --color=auto"
alias ls='ls -hF --color=auto' # add colors for filetype recognition
alias la='ls -Al --color=auto' # show hidden files
alias lx='ls -lXB --color=auto' # sort by extension
alias lk='ls -lSr --color=auto' # sort by size, biggest last
alias lc='ls -ltcr --color=auto' # sort by and show change time, most recent last
alias lu='ls -ltur --color=auto' # sort by and show access time, most recent last
alias lt='ls -ltr --color=auto' # sort by date, most recent last
alias lr='ls -lR --color=auto' # recursive ls
alias dir='dir --color=auto' # add colors
@petrowsky
petrowsky / fmp18_webview_features
Created April 24, 2020 00:15
FileMaker 18 macOS Web Viewer Features
# Unsupported browser features
no-ambientlight
no-battery-api
no-batteryapi
no-capture
no-contains
no-contextmenu
no-createelement-attrs
no-createelementattrs
@petrowsky
petrowsky / vhost.txt
Created October 25, 2019 18:06
vhost_segfault
root@s1:~# cat /var/aegir/config/server_master/nginx/vhost.d/domain.org
server {
listen *:80;
server_name domain.com www.domain.com www.domain.org;
rewrite ^ https://domain.org$request_uri? permanent;
}
server {
listen *:80;
#root /data/sites/domain.org;
@petrowsky
petrowsky / segfault_info.txt
Created October 25, 2019 17:57
segfault_info
root@s1:/var/xdrago/monitor# la
total 28K
drwx------ 2 root root 4.0K Oct 25 11:32 check/
-rw-r--r-- 1 root root 75 Oct 25 09:43 scan_nginx.archive.log
-rw-r--r-- 1 root root 149 Oct 25 05:26 scan_nginx.archive.x3.log
-rw-r--r-- 1 root root 390 Oct 25 00:34 segfault_alert
-rw-r--r-- 1 root root 5.5K Oct 25 00:33 segfault_alert_archive
-rw-r--r-- 1 root root 75 Oct 25 09:43 web.log
---------------- snip ----------------
@petrowsky
petrowsky / boa_info.txt
Created October 25, 2019 17:52
s1 BOA info
Aegir BOA-4.0.2-dev on Debian/stretch x86_64
VPS Linux KVM guest
DSK 83/100
CPU 4
RAM 7959
NGX 1.17.4
PHP 7.3.10
DBV 10.2.27
RDS 5.0.5
SSH 8.0p1
@petrowsky
petrowsky / barracuda_log.txt
Created October 21, 2019 21:52
barracuda_log.txt 2019-10-21
s1:/var/xdrago/conf# cat /var/backups/barracuda_log.txt
Wed Nov 14 17:43:09 EST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.4 / Barracuda BOA-2.0.4 / Nginx 1.3.8 / PHP 5.2.17 and 5.3.18 / MODERN-YES / FPM 5.3 / CLI 5.3 / MariaDB-5.5.28 localhost / Wildcard YES
Mon Nov 26 14:20:58 CST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.4 / Barracuda BOA-2.0.4 / Nginx 1.3.8 / PHP 5.2.17 and 5.3.18 / MODERN-YES / FPM 5.3 / CLI 5.3 / MariaDB-5.5.28 localhost / Wildcard YES
Wed Dec 12 16:13:18 CST 2012 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.4 / Barracuda BOA-2.0.4 / Nginx 1.3.8 / PHP 5.2.17 and 5.3.18 / MODERN-YES / FPM 5.3 / CLI 5.3 / MariaDB-5.5.28a localhost / Wildcard YES
Thu Jan 10 18:50:41 CST 2013 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.5 / Barracuda BOA-2.0.5 / Nginx 1.3.9 / PHP 5.2.17 and 5.3.20 / MODERN-YES / FPM 5.3 / CLI 5.3 / MariaDB-5.5.28a localhost / Wildcard YES
Mon Feb 25 13:15:46 CST 2013 / Debian.squeeze x86_64 XEN / Aegir BOA-2.0.5 / Barracuda BOA-2.0.5 / Nginx 1.3.9 / PHP 5.2.17 an
@petrowsky
petrowsky / OS X RamDisk
Created October 17, 2017 23:57
A shell function for creating a RAM disk of arbitrary size. Add to your bash (or other shell) profile.
ramdisk () {
test "$1" || 1=2
DISK_NAME="RamDisk"
MAX_SIZE=6
DISK_SIZE=$((${1}*1024*1024*1024/512))
DISK_FOUND=`df | grep -o $DISK_NAME`
if [[ $1 -gt $MAX_SIZE ]]
then
echo "NOTICE: Can't create a ram disk larger than $MAX_SIZE GB"
return
// FileMakerStandards ( tableOccurrenceName )
Let ( [
~tableOccurrenceName = tableOccurrenceName
];
List (
"---- GLOBAL FIELDS ----¶";
Upper (
Substitute (
ExecuteSQL ( "SELECT FieldName FROM FileMaker_Fields WHERE TableName='" & ~tableOccurrenceName & "' AND FieldType LIKE '%global%' ORDER BY FieldName" ; "" ; "" );