Skip to content

Instantly share code, notes, and snippets.

View Luidog's full-sized avatar

Lui de la Parra Luidog

View GitHub Profile
@Luidog
Luidog / .gitignore
Created October 19, 2019 01:47 — forked from iffy/.gitignore
Example using electron-updater with `generic` provider.
node_modules
dist/
yarn.lock
wwwroot
@Luidog
Luidog / pre-commit-eslint
Created February 25, 2018 21:38 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
https://www.googleapis.com/books/v1/volumes?q=isbn:"& Books::ISBN
https:// {{host}} / {{route}} / {{endpoint}} ? {{parameter}} = {{value}}
Set Field [ Books::title ; JSONGetElement ( $volumeInfo ; "title" ) ]
Set Field [ Books::authors ; JSONGetElement ( $volumeInfo ; "authors" ) ]
Set Field [ Books::publishedDate ; JSONGetElement ( $volumeInfo ; "publishedData" ) ]
Set Field [ Books::publisher ; JSONGetElement ( $volumeInfo ; "publisher" ) ]
Set Field [ Books::language ; JSONGetElement ( $volumeInfo ; "language" ) ]
Set Field [ Books::description ; JSONGetElement ( $volumeInfo ; "description" ) ]
Insert from URL [Select; No dialog; $json ; "https://www.googleapis.com/books/v1/volumes?q=isbn:"& Books::ISBN ]
Set Field [ Books::title ; JSONGetElement ( $response ; "items[0]" ) ]
Set Field [ Books::authors ; JSONGetElement ( $json ; "volumeInfo.authors[0]" ) ]
JSONGetElement ( $json ; "volumeInfo.authors[0]")
// → "Nate Silver"
@Luidog
Luidog / getBookJSON.txt
Last active February 14, 2018 04:56
JSonGetElement
Set Variable [ $json ; Value: JSONGetElement ( $response ; "items[0]" ) ]
// → $json
@Luidog
Luidog / generator-statuscode-patch.xml
Created February 12, 2018 19:33
HTTP Native ({request}) Status Code Patch
<?xml version="1.0" encoding="UTF-8"?>
<fmxmlsnippet type="FMObjectList">
<Step enable="True" id="89" name="# (comment)">
<Text>PATCH Proposed By L.D. and E.M.</Text>
</Step>
<Step enable="True" id="89" name="# (comment)">
<Text>--------------------------------------------------------------------------------------------</Text>
</Step>
<Step enable="True" id="89" name="# (comment)"/>
<Step enable="True" id="89" name="# (comment)">