Skip to content

Instantly share code, notes, and snippets.

unsigned char clear_day[] = {
0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x01, 0x80,
0x00, 0x01, 0x80, 0x81, 0x80, 0x01, 0xC0, 0x03, 0x80, 0x00, 0xC1, 0x83,
0x00, 0x00, 0x0F, 0xF0, 0x00, 0x00, 0x1E, 0x78, 0x00, 0x00, 0x38, 0x1C,
0x00, 0x00, 0x30, 0x0C, 0x00, 0x00, 0x20, 0x0E, 0x00, 0x0E, 0x70, 0x06,
0x70, 0x0E, 0x60, 0x06, 0xF0, 0x00, 0x70, 0x0C, 0x00, 0x00, 0x30, 0x0C,
0x00, 0x00, 0x38, 0x1C, 0x00, 0x00, 0x1E, 0x78, 0x00, 0x00, 0x0F, 0xF0,
0x00, 0x00, 0xC3, 0x83, 0x00, 0x01, 0xC0, 0x03, 0x80, 0x01, 0x80, 0x01,
var vows = require('vows');
var assert = require('assert');
require('../lib/date-utils.js').language('es');
vows.describe('Date Validate').addBatch({
'spanish dates are correct': {
topic: function ( ) {
var instance = new Date('January 1, 2016 16:00:00');
@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() {
~/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 / 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:
\set QUIET 1
-- formatting
\x auto
\set VERBOSITY verbose
\set ON_ERROR_ROLLBACK interactive
-- show execution times
\timing
-- limit paging
\pset pager off
/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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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;
\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();'