Skip to content

Instantly share code, notes, and snippets.

@sbcd90
sbcd90 / lucene.md
Created December 19, 2022 03:57 — forked from amontalenti/lucene.md

Lucene Fundamentals

A useful set of Lucene fundamentals that are good for grok'ing Elasticsearch.

Jargon Glossary

  • document: a record; the unit of search; the thing returned as search results
  • field: a typed slot in a document for storing and indexing values
  • index: a collection of documents, typically with the same field mappings or schema
  • corpus: the entire set of documents in an index
@sbcd90
sbcd90 / build-gcc.sh
Created September 10, 2021 23:34 — forked from jeetsukumaran/build-gcc.sh
Build and Install GCC Suite from Scratch
#! /bin/bash
GCC_VERSION="5.2.0"
WORKDIR="$HOME/src/"
INSTALLDIR="/platform"
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools.
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files.
# xcode-select --install
@sbcd90
sbcd90 / getLatestIstio.ps1
Created February 15, 2019 18:54 — forked from kameshsampath/getLatestIstio.ps1
The PowerShell script that can be used to download latest version of Istio analogus to https://git.io/getLatestIstio
param(
[string] $IstioVersion = "0.3.0"
)
$url = "https://github.com/istio/istio/releases/download/$($IstioVersion)/istio_$($IstioVersion)_win.zip"
$Path = Get-Location
$output = [IO.Path]::Combine($Path, "istio_$($IstioVersion)_win.zip”)
Write-Host "Downloading Istio from $url to path " $Path -ForegroundColor Green
@sbcd90
sbcd90 / DataImportExample.java
Created February 10, 2016 19:46 — forked from abhijitchanda/DataImportExample.java
Cassandra SSTableLoader Example
/**
* Disclaimer:
* This file is an example on how to use the Cassandra SSTableSimpleUnsortedWriter class to create
* sstables from a csv input file.
* While this has been tested to work, this program is provided "as is" with no guarantee. Moreover,
* it's primary aim is toward simplicity rather than completness. In partical, don't use this as an
* example to parse csv files at home.
*/
import java.nio.ByteBuffer;
import java.io.*;
@sbcd90
sbcd90 / gist:22783669d115363e58ed
Created November 19, 2015 13:48 — forked from mdellabitta/gist:1444003
how do do spring jdbc transactions with jdbctemplate/transactiontemplate
public class ExodusWriter {
private JdbcTemplate jdbcTemplate;
private TransactionTemplate transactionTemplate;
public ExodusWriter(DataSource dataSource) {
DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
jdbcTemplate = new JdbcTemplate(transactionManager.getDataSource());
transactionTemplate = new TransactionTemplate(transactionManager);
}