Skip to content

Instantly share code, notes, and snippets.

View electrum's full-sized avatar
🚀
Working on @trinodb at @starburstdata

David Phillips electrum

🚀
Working on @trinodb at @starburstdata
View GitHub Profile

full build, like mvn install

# See knownSparkVersions in gradle.properties for current list Spark versions
./gradlew -DsparkVersions=2.4,3.0,3.1,3.2,3.3 -x test -x integrationTest build publishToMavenLocal

# ... or pull the list automatically
./gradlew -DsparkVersions=$(sed -n 's/^systemProp.knownSparkVersions=//p' gradle.properties) \
    -x test -x integrationTest build publishToMavenLocal

Source: https://gist.github.com/findepi/04c96f0f60dcc95329f569bb0c44a0cd .

quick build

./mvnw -T2C clean install -nsu -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Dair.check.skip-all=true -pl '!:trino-server-rpm,!:trino-docs,!:trino-proxy,!:trino-verifier,!:trino-benchto-benchmarks'

run Trino in a container, quickly

docker rm -f trino; docker run --rm -it --name trino -p 8080:8080 trinodb/trino:438
@Zenexer
Zenexer / escapeshellrce.md
Last active November 2, 2023 06:09
Security Advisory: PHP's escapeshellcmd and escapeshellarg are insecure

Paul Buonopane paul@namepros.com at NamePros
PGP: https://keybase.io/zenexer

I'm working on cleaning up this advisory so that it's more informative at a glance. Suggestions are welcome.

This advisory addresses the underlying PHP vulnerabilities behind Dawid Golunski's [CVE-2016-10033][CVE-2016-10033], [CVE-2016-10045][CVE-2016-10045], and [CVE-2016-10074][CVE-2016-10074]. It assumes prior understanding of these vulnerabilities.

This advisory does not yet have associated CVE identifiers.

Summary

@smarr
smarr / truffle-material.md
Last active May 9, 2024 08:19
Truffle: Languages and Material
@krujos
krujos / yanfs example
Created February 2, 2015 20:36
Java NFS client
package nfstest;
import com.sun.xfile.XFile;
/**
* Using YANFS
*
*/
public class Main {
@electrum
electrum / README.md
Last active June 2, 2020 12:04
Git Scripts

Install the following programs and configure them with permissions to access your GitHub profile:

These scripts assume the following two remotes exist:

  • origin: your fork
  • upstream: the upstream repository
#!/bin/bash
function setjdk {
local ver=${1?Usage: setjdk <version>}
export JAVA_HOME=$(/usr/libexec/java_home -v $ver)
PATH=$(echo $PATH | tr ':' '\n' | grep -v Java | tr '\n' ':')
export PATH=$JAVA_HOME/bin:$PATH
}
@munificent
munificent / gist:9749671
Last active June 23, 2022 04:04
You appear to be creating a new IDE...
You appear to be advocating a new:
[ ] cloud-hosted [ ] locally installable [ ] web-based [ ] browser-based [ ] language-agnostic
[ ] language-specific IDE. Your IDE will not succeed. Here is why it will not succeed.
You appear to believe that:
[ ] Syntax highlighting is what makes programming difficult
[ ] Garbage collection is free
[ ] Computers have infinite memory
[ ] Nobody really needs:

Presto connector development 1

One of the very good design decisions Presto designers made is that it's loosely coupled from storages.

Presto is a distributed SQL executor engine, and doesn't manager schema or metadata of tables by itself. It doesn't manage read data from storage by itself. Those businesses are done by plugins called Connector. Presto comes with Hive connector built-in, which connects Hive's metastore and HDFS to Presto.

We can connect any storages into Presto by writing connector plugins.

Plugin Architecture

@electrum
electrum / build-native-mac.sh
Last active July 16, 2020 06:34
Compile native libraries on Mac OS X
brew install snappy
CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ant compile-native
chmod 644 build/native/Mac_OS_X-x86_64-64/lib/*
ls -l /usr/local/lib/libsnappy.dylib
ls -l build/native/Mac_OS_X-x86_64-64/lib/libhadoop.dylib