Skip to content

Instantly share code, notes, and snippets.

@revig
revig / revIgniterShellCommandsConfig.cson
Created July 7, 2020 11:23
Atom-shell-commands package configuration used in Atom to create the basic code of a revIgniter controller, the code of a controller and the associated view file. The revIgniter User Guide can be opened too. Note: Requires command line scripts revigniterController.lc, revigniterControllerView.lc and revigniterHelp.lc, which are available here too.
"atom-shell-commands":
commands: [
{
arguments: [
"{FilePath}"
"{FileName}"
]
command: "/absolute/path/to/script/revigniterController.lc"
name: "controller"
options:
@revig
revig / revigniterController.lc
Created July 7, 2020 11:22
LiveCode script to be used on the command line while working on revIgniter projects in Atom. Run this script using the atom-shell-commands package in Atom to create a new controller. See the "keymap" in the configuration provided here too and use the shortcut to copy the controller code to the clipboard after having created a new empty file in t…
#!/usr/bin/env livecode-community-server
-- coding:utf-8 --
if the outputLineEndings = "cr" then
set the outputLineEndings to "lf"
end if
-- GET RELATIVE FILE PATH
if $0 is not empty then
put $0 into tFilePath
@revig
revig / revigniterControllerView.lc
Last active July 7, 2020 15:37
LiveCode script to be used on the command line while working on revIgniter projects in Atom. Run this script using the atom-shell-commands package in Atom to create a new controller and the associated view file. See the "keymap" in the configuration provided here too and use the shortcut to copy the controller code to the clipboard after having …
#!/usr/bin/env livecode-community-server
-- coding:utf-8 --
if the outputLineEndings = "cr" then
set the outputLineEndings to "lf"
end if
-- GET RELATIVE FILE PATH OF CONTROLLER
if $0 is not empty then
put $0 into tControllerPath
@revig
revig / revigniterHelp.lc
Created July 7, 2020 11:19
LiveCode script to be used on the command line while working on revIgniter projects in Atom. Run this script using the atom-shell-commands package in Atom. See the "keymap" in the configuration provided here too and use the shortcut to load the revIgniter User Guide in a browser.
#!/usr/bin/env bash
open 'https://revigniter.com/userGuide/index.html'
@revig
revig / openpgp.md
Created May 11, 2020 09:59
Linked Identity confirmation
@revig
revig / sendFileSavedMsg.php
Last active December 6, 2022 14:05
PHP script to be used on the command line while working on Levure projects in Atom. Run this script using the atom-shell-commands package in Atom while working on a Levure project to notify LC about script changes on save. Verify that the path to your PHP executable matches the one in the hashbang.
#!/usr/bin/php
<?php
$fileName = '';
if (!empty($argv[1])) {
$fileName = $argv[1];
}
// STACKNAME
@revig
revig / sendFileSavedConfiguration.cson
Created March 20, 2019 17:22
Atom-shell-commands package configuration used in Atom to notify LC about Levure script changes on save. Note: Requires a modified version of the Levure external_editor_server script and the sendFileSavedMsg command line script which are available here too.
"atom-shell-commands":
commands: [
{
arguments: [
"{FilePath}"
]
command: "/absolute/path/to/script/sendFileSavedMsg.lc"
name: "sendFileSavedMsg"
options:
cwd: "{FileDir}"
@revig
revig / external_editor_server.livecodescript
Last active December 6, 2022 17:45
Modified version of the Levure external_editor_server script to be used in Atom to notify LC about script changes on save. Note: This script requires the atom-shell-commands package and the sendFileSavedMsg command line script which is available here too. See sendFileSavedConfiguration.cson for configuration.
script "levureExternalEditorServer"
constant kDefaultPort = "61373"
command levureExternalEditorStartServer pPort
script "levureExternalEditorServer"
constant kDefaultPort = "61373"
command levureExternalEditorStartServer pPort
@revig
revig / sendFileSavedMsg.lc
Last active March 20, 2019 17:16
LiveCode script to be used on the command line while working on Levure projects in Atom. Run this script using the atom-shell-commands package in Atom while working on a Levure project to notify LC about script changes on save. Note: This requires a modified version of the Levure external_editor_server script which is available here too.
#!/usr/bin/env livecode-community-server
-- coding:utf-8 --
if the outputLineEndings = "cr" then
set the outputLineEndings to "lf"
end if
put empty into tFileName
if $0 is not empty then