Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Freidman compnski

View GitHub Profile
@compnski
compnski / table_hash.go
Last active Feb 16, 2020
Builds a SQL statement to hash a table in any of postgres/mysql/redshift, with the same result across the 3.
View table_hash.go
package main
import (
"flag"
"fmt"
"strings"
)
const DB_REDSHIFT = "redshift"
const DB_POSTGRES = "postgres"
View go structs and interfaces
package main
import "fmt"
import "io"
type notACloser struct {
Close func() error
}
func close() error {
View periscope sample sdks
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 Jun 11, 2020
Robo-Plant Keeper. Water plants every few days.
View plant_waterer.c
#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;
You can’t perform that action at this time.