Skip to content

Instantly share code, notes, and snippets.

@symbioquine
symbioquine / example_usage_with_pagination.js
Created March 25, 2022 03:52
Using Drupal Subrequests from Javascript
import makeDrupalSubrequest from '@/makeDrupalSubrequest';
const assetTypes = ['animal', 'land', 'plant'];
async main() {
const filterQueryString = `filter[is_location]=1`;
async function* paginateAssets() {
const requests = assetTypes.map(assetType => ({
id: assetType,
@symbioquine
symbioquine / README.md
Created April 21, 2022 14:31
Running farmOS 2.x as a subpath behind a reverse proxy

Demonstrates a simple strategy to host farmOS in a subpath/subdirectory behind a reverse proxy.

Assumes that the farmos.test domain is pointing at localhost or the IP of the server where this example is being run.

The main "tricky" thing that's going on in the example is the creation of a symlink in the web root from ./farm0/ back to the web root itself. That was the simplest strategy I could find to make Drupal understand that it should serve itself from the subdirectory without more complex configuration or file moving.

@symbioquine
symbioquine / RecordEggHarvestAssetActionProvider.alink.vue
Created August 19, 2022 16:15
RecordEggHarvestAssetActionProvider.alink.vue
{
"plugins": [
{
"url": "https://gist.githubusercontent.com/symbioquine/370e0a2b6797564a3a3f3985b099aa2c/raw/77470fc15b3caccffc142809337f2efd5d943553/AddNewBalesToInventory.alink.vue"
},
{
"url": "https://gist.githubusercontent.com/symbioquine/7f1d67f504ab427c5d7e673baee01c65/raw/5a219422aa18709bab6bc71f9af4c1cfaae66577/RecordEggHarvestAssetActionProvider.alink.vue"
},
{
"url": "https://gist.githubusercontent.com/symbioquine/9a6921914a70f56792e04056b5fc0ce1/raw/6cd1246dd7bce4059d7d12470d5515aa71162620/LogChangedEquipmentOil.alink.act.json"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.