Skip to content

Instantly share code, notes, and snippets.

View sploiselle's full-sized avatar

Sean Loiselle sploiselle

  • MaterializeInc
  • NYC
View GitHub Profile

You can start the materialized binary with:

./materialized_(linux|mac) --dev --w=1

And then launch into the SQL interface (e.g. psql -h 0.0.0.0 -p 6875 -d materialize)

@sploiselle
sploiselle / decimal-single-pass.rs
Created December 12, 2019 18:23
Parsing a string as a decimal in a single pass with a lot of if statements
for c in s.chars() {
if c == '.' {
if seen_decimal {
bail!("multiple decimal points in numeric literal: {}", s)
}
seen_decimal = true;
continue;
}
if c == '-' {
if seen_e_notation {
-- Invariants:
-- * Each run is only ever used on one cloud
-- * Each run only ever uses one version of Cockroach
CREATE TABLE runs (
id INT8 PRIMARY KEY,
crdb_version STRING DEFAULT 'master',
INDEX (cloud) COVERING id, -- Get all runs by cloud
INDEX (crdb_version) COVERING id -- Get all runs by version; e.g. roachperf wants master but SE tools want specific version
);

In attendance: Amruta, Lauren, Sean

Problem

Lots of negative votes on current docs home page

Solution

Workflow-topic based content - Fulfill user's intent "ISBAT"

seanloiselle:...b.com/cockroachdb/cockroach]$ make (more-metric-metadata✱)
GOPATH set to /Users/seanloiselle/go
Running make with -j8
rm -rf /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/jemalloc
rm -rf /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/protobuf
mkdir -p /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/jemalloc
rm -rf /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/snappy
mkdir -p /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/protobuf
rm -rf /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/cryptopp
mkdir -p /Users/seanloiselle/go/native/x86_64-apple-darwin16.7.0/cryptopp
  1. Open Terminal (cmd + spacebar; search for Terminal).
  2. Move to the directory where you keep these files:
    cd ~/Desktop/[folder name]
    
  3. Check to make sure all of the file you're changing show up:
    git status
    
  4. If they are, you want to add them to staging:
@sploiselle
sploiselle / DynamicDropDownsInGoogleSheets.md
Last active November 9, 2017 21:12
DynamicDropDownsInGoogleSheets
  1. Open up an ACT test to categorize.

  2. Go to the QUESTIONS sheet, and select everything on it (CTRL+A on a PC, command+A on a Mac).

  3. Go to Data > Data Validation; click Remove Validation and agree to whatever it asks you to do.

  4. Replace everything in the topic names sheet with this sheet's contents. Make sure you leave the single blank row at the top––you can make sure it's selected by doing a select-all action twice.

  5. Go to Tools > Script Editor.

@sploiselle
sploiselle / sql-cheat-sheet.md
Last active August 29, 2017 16:50
Simple SQL commands to use CockroachDB

Applications you build with CockroachDB use SQL to interact with your data. Use this simple guide to help you get started with some basic SQL statements.

Write data with INSERT

Implicit columns

INSERT INTO tbl_name VALUES (1, 'a'), (2, 'b'), (3, 'a');
@sploiselle
sploiselle / gittips.md
Last active August 2, 2017 20:34
Tips for Using Git
  • Open new branch:

    git checkout -b [branch_name] origin/master
    
  • "Undo" changes to file:

git checkout /path/to/file