Skip to content

Instantly share code, notes, and snippets.

@compnski
compnski / table_hash.go
Last active April 14, 2023 03:20
Builds a SQL statement to hash a table in any of postgres/mysql/redshift, with the same result across the 3.
package main
import (
"flag"
"fmt"
"strings"
)
const DB_REDSHIFT = "redshift"
const DB_POSTGRES = "postgres"
package main
import "fmt"
import "io"
type notACloser struct {
Close func() error
}
func close() error {
Please update with customers submitted versions or ones we create inhouse.
PHP (from dan@ufn)
p_api_key = 'YOUR_API_KEY';
$filter_json = '{
"dashboard": 8227,
"embed": true,
"filters": [{"name": "AccountIDs", "value": "71005"}]
}';
$encode_json = urlencode(str_replace(' ','',$filter_json));
@compnski
compnski / plant_waterer.c
Created June 11, 2020 02:45
Robo-Plant Keeper. Water plants every few days.
#include <SoftwareSerial.h>
const int led_g = 2;
const int led_r = 9;
const int relay_1 = 4;
const int relay_2 = 5;
const int serial_tx = 11;
const int sw_top = 12;