- Bright, indirect light. Avoid direct sunlight as it can scorch the leaves.
- Keep the soil consistently moist but not waterlogged.
- Allow the top layer to dry slightly before watering again.
| const isEnabled = true | |
| const numberOfShiftGroups = 2 | |
| function onEdit(event) { | |
| console.log(`Event range: ${event.range.getA1Notation()}`) | |
| if (!isEnabled && event.range.getSheet().getSheetName() !== "Shifts") { | |
| return | |
| } | |
| const speadSheet = SpreadsheetApp.getActiveSpreadsheet() | |
| const shiftsSheet = speadSheet.getSheetByName("Shifts") |
| SELECT usename AS role_name, | |
| CASE | |
| WHEN usesuper AND usecreatedb THEN | |
| CAST('superuser, create database' AS pg_catalog.text) | |
| WHEN usesuper THEN | |
| CAST('superuser' AS pg_catalog.text) | |
| WHEN usecreatedb THEN | |
| CAST('create database' AS pg_catalog.text) | |
| ELSE | |
| CAST('' AS pg_catalog.text) |
| class MyClass { | |
| public myProp = 13; | |
| public static readonly myStaticReadOnlyProp = 99; | |
| private myPrivateProp: string | undefined; | |
| constructor() { | |
| this.myPrivateProp = undefined; | |
| } | |
| public myPublicFunction() { |
| import * as r from 'ramda'; | |
| import * as fp from 'fp-ts'; | |
| type PickStrings<T> = { | |
| [Key in keyof T]: string extends T[Key] ? T[Key] : never | |
| } | |
| type StringKeysAsValues<T> = { | |
| [Key in keyof T]-?: string extends T[Key] ? Key : never | |
| } |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
| # Add field | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
| # { | |
| # "hello": "world", | |
| # "foo": "bar" | |
| # } | |
| # Override field value | |
| echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
| { |
| /** | |
| * Creates a union type with names of all properties of T where S extends T[Key] | |
| * | |
| * @example | |
| * ```ts | |
| * type T = { a: string; b?: string; c: string | undefined; d: string | null; e: number }; | |
| * type StringPropertiesFromT = PropertiesOfType<T, string>; // 'a' | 'b' | 'c' | 'd' | |
| * ``` | |
| */ | |
| export type PropertiesOfType<T, S> = { |
| * | |
| NAME: SCRIPT NUGGETS | |
| DESCRIPTION: Apps Script functions for use with AppSheet | |
| SETUP: Replace YOUR_SHEET_ID in first line with the sheet Id from the sheet URL | |
| BY: GreenFlux, LLC | |
| *////////////////////////////////////////////////////////////////////////////////////////////////////// | |
| const ss = SpreadsheetApp.openById('YOUR_SHEET_ID');//(id from sheetURL) |
| function createEventWithAttachment() { | |
| var driveFileId = '...'; | |
| var file = DriveApp.getFileById(driveFileId); | |
| var event = { | |
| summary: 'Test Event with Attachments', | |
| description: 'Woot!', | |
| attachments: [{ | |
| fileId: driveFileId, | |
| fileUrl: file.getUrl(), | |
| mimeType: file.getMimeType(), |