Skip to content

Instantly share code, notes, and snippets.

ARG PG_CONTAINER_VERSION=16
FROM docker.io/library/postgres:${PG_CONTAINER_VERSION}-bookworm as builder
ARG DEBIAN_FRONTEND=noninteractive
RUN set -ex \
&& apt-get update \
&& apt-get install -y build-essential git postgresql-server-dev-${PG_MAJOR} libtinfo5 pkg-config clang binutils libstdc++-12-dev cmake gnupg postgresql-common postgresql-server-dev-${PG_MAJOR} apt-transport-https lsb-release wget\
&& apt-get clean
RUN echo "deb https://packagecloud.io/timescale/timescaledb/debian/ $(lsb_release -c -s) main" | tee /etc/apt/sources.list.d/timescaledb.list
Script started on Thu Aug 15 15:19:13 2019
%
jerry@Jerrys-Mac plv8 % [?2004hmmake[?2004l
mkdir -p build
cd build; git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
Cloning into 'depot_tools'...
remote: Sending approximately 26.24 MiB ...
\set QUIET 1
-- show execution times
\timing
-- Autocomplete keywords (like SELECT) in upper-case, even if you started
-- typing them in lower case.
\set COMP_KEYWORD_CASE upper
--helpful queries
\set uptime 'select now() - backend_start as uptime from pg_stat_activity where pid = pg_backend_pid();'
@JerrySievert
JerrySievert / convert.c
Created January 26, 2018 05:57
converts samples to vcvrack for me
#include <stdio.h>
#include <stdlib.h>
union bytes {
float val;
unsigned char str[sizeof(float)];
};
int main (int argc, char **argv) {
FILE *f1;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.v8
mkdir -p build
echo "extern const unsigned char coffee_script_binary_data[] = {" >coffee-script.cc
echo "extern const unsigned char livescript_binary_data[] = {" >livescript.cc
sed -e 's/@PLV8_VERSION@/2.0.0-dev/g' plv8.control.common | g++ -E -P -DLANG_plv8 - > plv8.control
sed -e 's/@LANG_NAME@/plv8/g' plv8.sql.common | sed -e 's/@PLV8_VERSION@/2.0.0-dev/g' | g++ -E -P -I. -I./ -I/usr/local/pgsql/include/server -I/usr/local/pgsql/include/internal -DLANG_plv8 - > plv8--2.0.0-dev.sql
cd build; git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
sed -e 's/@PLV8_VERSION@/2.0.0-dev/g' plv8.control.common | g++ -E -P -DLANG_plcoffee - > plcoffee.control
(od -txC -v coffee-script.js | \
sed -e "s/^[0-9]*//" -e s"/ \([0-9a-f][0-9a-f]\)/0x\1,/g" -e"\$d" ) >>coffee-script.cc
\set QUIET 1
-- formatting
\x auto
\set VERBOSITY verbose
\set ON_ERROR_ROLLBACK interactive
-- show execution times
\timing
-- limit paging
\pset pager off
@JerrySievert
JerrySievert / cromag.js
Created March 29, 2016 21:21
hacked cromag
/*
© 2012 by Jerry Sievert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
~/Downloads/checker-278/bin/scan-build make
scan-build: Using '/Users/jerry/Downloads/checker-278/bin/clang' for static analysis
/Users/jerry/Downloads/checker-278/bin/../libexec/ccc-analyzer -Isrc -Wall -Werror -march=native -O3 -c src/http_request.cpp -o src/http_request.o
/Users/jerry/Downloads/checker-278/bin/../libexec/ccc-analyzer -Isrc -Wall -Werror -march=native -O3 -c src/http_response.cpp -o src/http_response.o
/Users/jerry/Downloads/checker-278/bin/../libexec/ccc-analyzer -Isrc -Wall -Werror -march=native -O3 -c src/http_router.cpp -o src/http_router.o
/Users/jerry/Downloads/checker-278/bin/../libexec/ccc-analyzer -Isrc -Wall -Werror -march=native -O3 -c test/http_request.cpp -o test/http_request.o
test/http_request.cpp:18:10: warning: Access to field 'method' results in a dereference of a null pointer (loaded from variable 'request')
check((request->method == HTTP_GET), "method is set to GET");
^~~~~~~~~~~~~~~
test/test.h:29:40: note: expanded from macro 'check'
@JerrySievert
JerrySievert / main.ino
Created February 11, 2016 03:54
hello world, esp8266
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
Serial.println("Setup");
pinMode(D2, OUTPUT);
}
void loop() {