Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
| from playwright.sync_api import sync_playwright | |
| def save_mhtml(path: str, text: str): | |
| with open(path, mode='w', encoding='UTF-8', newline='\n') as file: | |
| file.write(text) | |
| def save_page(url: str, path: str): | |
| with sync_playwright() as playwright: | |
| browser = playwright.chromium.launch(headless=False) |
| import Foundation | |
| // Export running app as .ipa, then return path to exported file. | |
| // Returns String because app crashes when returning URL from async function for some reason... | |
| func exportIPA() async throws -> String | |
| { | |
| // Path to app bundle | |
| let bundleURL = Bundle.main.bundleURL | |
| // Create Payload/ directory |
| # Use Google Cloud Platform stackdriver with python structlog | |
| from google.cloud.logging import Client | |
| from google.cloud.logging import _helpers | |
| from google.cloud.logging.handlers import CloudLoggingHandler | |
| from google.cloud.logging.handlers.transports.background_thread import _Worker | |
| # pip install python-json-logger | |
| from pythonjsonlogger import jsonlogger |
| #include <stdio.h> | |
| #include <freetype2/ft2build.h> | |
| #include FT_FREETYPE_H | |
| int main() { | |
| FT_Library ft; | |
| FT_Error err = FT_Init_FreeType(&ft); | |
| if (err != 0) { | |
| printf("Failed to initialize FreeType\n"); |
| # Let 'em know that we're Still Alive | |
| # http://pastebin.com/f72f8f72d (no longer valid) | |
| # On macOS, install sox with brew: `brew install sox` | |
| #!/bin/bash | |
| echo -n "This " | |
| play --no-show-progress --null --channels 1 synth 0.200 sine 784 | |
| echo -n "was " | |
| play --no-show-progress --null --channels 1 synth 0.200 sine 740 | |
| echo -n "a " |
| #!/bin/bash | |
| # | |
| # NOTE: specify the absolutepath to the directory to use when | |
| # loading a plugin. '~' expansion is supported. | |
| # | |
| chunkc core::plugin_dir /usr/local/opt/chunkwm/share/chunkwm/plugins | |
| # |
| # Description: Boxstarter Script | |
| # Author: Jess Frazelle <[email protected]> | |
| # Last Updated: 2017-09-11 | |
| # | |
| # Install boxstarter: | |
| # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| # | |
| # You might need to set: Set-ExecutionPolicy RemoteSigned | |
| # | |
| # Run this boxstarter by calling the following from an **elevated** command-prompt: |
Watch a table for changes and push a notification with a payload describing the change.
In the Postgres shell:
-- Create the functions
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Object.observe</title> | |
| </head> | |
| <body> | |
| <h1 reactive>Title here</h1> | |
| <p reactive>Text here</p> | |
| <hr /> | |
| <p><b>Hey!</b> Open up the console and change the <tt>title</tt> |