Skip to content

Instantly share code, notes, and snippets.

View sherakama's full-sized avatar
💭
🇨🇦 Working from home

Sherakama sherakama

💭
🇨🇦 Working from home
View GitHub Profile
/** Delete a record based on finding record id in the 2way link field venue **/
const table = base.getTable("Web Only");
const inputConfig = input.config();
const recordId = inputConfig['recordId'];
const fieldName = 'Venue';
// Can't query just by a field value so we have to get all the fields and loop through them.
const queryResult = await table.selectRecordsAsync({fields: ['Name', fieldName]})
const matchingRecords = queryResult.records.filter((record) => {
const vals = record.getCellValue(fieldName);
if (vals && vals[0] && vals[0].id && vals[0].id == recordId) {
@sherakama
sherakama / pr-checklist.md
Last active November 29, 2022 11:05
Pull Request Checklist

When reviewing a pull request please check for the following

  • Unit Test provided
  • Does this require a behat test?
  • Deprecated code removed
  • Is all markup and styles accessible?
  • Syntax & Formatting is correct (Code Climate should take care of this)
  • Is the approach to the problem appropriate?
  • Can anything be simplified?
  • Is the code too specific to _ and needs generalization:
import React from 'react'
import Components from '../components/components.js'
import SbEditable from 'storyblok-react'
import config from '../../gatsby-config'
import Loader from 'react-loader-spinner'
const sbConfigs = config.plugins.filter((item) => {
return item.resolve === 'gatsby-source-storyblok'
})
const sbConfig = sbConfigs.length > 0 ? sbConfigs[0] : {}
LANDO FILE:
----------------------------------------------------
name: cardinalsites
recipe: drupal8
config:
webroot: docroot
php: '7.3'
xdebug: true
services:
appserver:
@sherakama
sherakama / DevStandards.MD
Last active April 25, 2020 20:15
Stanford Web Services Drupal Development Standards

Drupal Development Standards

by Stanford Web Services
Version: 1.0.0
Date: October 30, 2015

This document is meant to be a comprehensive guide to web development standards for Stanford Web Services around Drupal web development. This document is our canonical source and guide.

Code Standards

@sherakama
sherakama / simplepie.compiled.php
Created November 22, 2017 22:22
simplepie.compiled.php 1.3.1
<?php
/**
* SimplePie
*
* A PHP-Based RSS and Atom Feed Framework.
* Takes the hard work out of managing a complete RSS/Atom solution.
*
* Please note: This file is automatically generated by a build script. The
* full original source is always available from http://simplepie.org/
*
@sherakama
sherakama / sites-lando-clone.sh
Last active September 7, 2018 21:31
sites-lando-clone.sh
#!/bin/csh
##################
# Variables
##################
# Path to a place to store your sites.
WEBSERVERROOT=/httpdocs #no trailing slash
# Path to your lando configuration file for Drupal 7
LANDOCONFIG=/Users/admin/scripts/su/d7.lando.yml
@sherakama
sherakama / d7.lando.yml
Last active April 27, 2018 15:06
d7.lando.yml
name: [shortname]
recipe: drupal7
config:
webroot: /
php: '7.1'
services:
appserver:
ssl: true
database:
type: mysql:5.7
@sherakama
sherakama / sites.aliases.drushrc.php
Last active March 20, 2018 21:50
Wildcard remote aliases for sites.
<?php
## STANFORD WILDCARD ###########################################################
// The command you just typed in shell.
$command = $_SERVER['argv'];
$remote_user = "sheamck";
// Look at every argument...
foreach ($command as $arg) {
@sherakama
sherakama / README.md
Last active February 16, 2018 19:21
Drupal 7 module README.md stubb