Skip to content

Instantly share code, notes, and snippets.

View build-error.txt
[ 19%] Linking CXX executable couch_dbdump
/usr/bin/ld: ../tlm/deps/flatbuffers.exploded/lib/libflatbuffers.a(idl_parser.cpp.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../tlm/deps/flatbuffers.exploded/lib/libflatbuffers.a(idl_gen_text.cpp.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../tlm/deps/flatbuffers.exploded/lib/libflatbuffers.a(util.cpp.o): relocation R_X86_64_32S against symbol `_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
couchstore/CMakeFiles/couch_dbdump.dir/build.make:241: recipe for target 'couchstore/couch_dbdump' failed
make[4]: *** [couchstore/couch_dbdump] Error 1
CMakeFiles/Makefile2:9108: recipe for target 'couchstore/CMakeFiles/couch_dbdump.dir/all' fai
View versions.txt
mschoch@mschoch-virtualbox:/mnt/build$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
mschoch@mschoch-virtualbox:/mnt/build$ uname -a
Linux mschoch-virtualbox 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
View build-cbft-with-go-mod.sh
#!/bin/sh
# create temp directory to do all work
tmpfile=$(mktemp -d)
echo "Working in $tmpfile"
cd $tmpfile
# check out gocbcore
git clone git@github.com:couchbase/gocbcore.git
@mschoch
mschoch / main.go
Created Mar 10, 2020
reproduce deleted files still open (as shown by lsof)
View main.go
package main
import (
"github.com/blevesearch/bleve"
"github.com/blevesearch/bleve/index/scorch"
"log"
)
func main() {
View gist:d6462193786a44ae6ae748b485d17c40
Poky (Yocto Project Reference Distro) SDK installer version 2.1.3
=================================================================
Enter target directory for SDK (default: /opt/poky/2.1.3):
You are about to install the SDK to "/opt/poky/2.1.3". Proceed[Y/n]? Y
[sudo] password for mschoch:
Extracting SDK......................................................................................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
$ . /opt/poky/2.1.3/environment-setup-cortexa9hf-neon-poky-linux-gnueabi
View main.go
package main
import (
"log"
"os"
"github.com/couchbase/vellum"
)
func main() {
View gist:8dcfbf7b955b644e23eb0e14d41d92c7
➜ testscore ./testscore
2018/07/06 12:33:02 scorch
2018/07/06 12:33:02 calling compose for public_likes with length 2
2018/07/06 12:33:02 calling compose for reviews.date with length 7
2018/07/06 12:33:02 calling compose for reviews.ratings.Cleanliness with length 16
2018/07/06 12:33:02 calling compose for reviews.ratings.Location with length 16
2018/07/06 12:33:02 calling compose for reviews.ratings.Overall with length 16
2018/07/06 12:33:02 calling compose for reviews.ratings.Rooms with length 16
2018/07/06 12:33:02 calling compose for reviews.ratings.Service with length 16
2018/07/06 12:33:02 calling compose for reviews.author with length 2
View hotel_26141.json
{
"address": "4750 Geary Blvd",
"alias": null,
"checkin": null,
"checkout": null,
"city": "San Francisco",
"country": "United States",
"description": "This former dive has been completely remodeled with clean rooms, nice televisions, microwaves, blowdryers, irons, and mini fridges. Reasonable prices, safe and neat - the owners have put a lot of effort into making this motel quiet and nice.",
"directions": "at 12th Ave",
"email": null,
View query.json
{
"conjuncts": [
{
"disjuncts": [
{
"match": "planner_hostname_1",
"field": "hostname",
"prefix_length": 0,
"fuzziness": 0
},
View gist:0a7fedde54bb043bc0520ef0215f4b31
curl -XPUT -H "Content-Type: application/json" \
http://127.0.0.1:8094/api/index/testshouldnwork -d \
'{
"type": "fulltext-index",
"name": "testshouldnwork",
"sourceType": "couchbase",
"sourceName": "travel-sample",
"planParams": {
"maxPartitionsPerPIndex": 171
},
You can’t perform that action at this time.