Skip to content

Instantly share code, notes, and snippets.

@arbelt
arbelt / drill-1.16-addDefaultRowPrefetch.patch
Last active July 25, 2019 20:24
Add connection parameters to JDBC connections for Drill 1.16
diff --git a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
index ebff37173..16dc163c9 100755
--- a/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
+++ b/contrib/storage-jdbc/src/main/java/org/apache/drill/exec/store/jdbc/JdbcStoragePlugin.java
@@ -90,6 +90,8 @@ public class JdbcStoragePlugin extends AbstractStoragePlugin {
source.setDriverClassName(config.getDriver());
source.setUrl(config.getUrl());
+ source.addConnectionProperty("defaultRowPrefetch", "200");
+
@jamesrampton
jamesrampton / open_without.sh
Last active October 8, 2019 21:16
Clean up Mac OS X Open With menu
#!/bin/bash
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
killall Finder
@yryozo
yryozo / orgtbl-to-gfm.el
Created June 18, 2013 17:02
Orgtbl Translator function for the GitHub-Flavored-Markdown(GFM)
;; Usage Example:
;;
;; <!-- BEGIN RECEIVE ORGTBL ${1:YOUR_TABLE_NAME} -->
;; <!-- END RECEIVE ORGTBL $1 -->
;;
;; <!--
;; #+ORGTBL: SEND $1 orgtbl-to-gfm
;; | $0 |
;; -->
@skranz
skranz / s_dplyr
Created March 21, 2014 07:48
Wrappers to dplyr's data modification functions like arrange, select,... that work with string arguments.
# Helper functions that allow string arguments for dplyr's data modification functions like arrange, select etc.
# Author: Sebastian Kranz
# Examples are below
#' Modified version of dplyr's filter that uses string arguments
#' @export
s_filter = function(.data, ...) {
eval.string.dplyr(.data,"filter", ...)
}
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
// https://raw.githubusercontent.com/donnut/typescript-ramda/master/ramda.d.ts
// https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/master/lodash/lodash.d.ts
declare namespace fp {
interface Dictionary<T> {
[index: string]: T;
}
interface CurriedFunction1<T1, R> {
@evocateur
evocateur / fixconsolas
Created March 15, 2009 00:15
Fix Consolas's line-height on OS X
#!/bin/bash
#
# Requires ftxdumperfuser from http://developer.apple.com/textfonts/download/
#
# Usage: fixconsolas [files ...]
# When called with no arguments, it attempts to operate on every TrueType
# file in the current directory.
#
# References:
# http://bandes-storch.net/blog/2008/12/21/consolas-controlled/#comment-2042
;; Usage Example:
;;
;; <!--- BEGIN RECEIVE ORGTBL ${1:YOUR_TABLE_NAME} -->
;; <!--- END RECEIVE ORGTBL $1 -->
;;
;; <!---
;; #+ORGTBL: SEND $1 orgtbl-to-gfm
;; | $0 |
;; -->
@vasilisvg
vasilisvg / HTML-presentation-tools.md
Created January 14, 2012 13:53
HTML presentation tools

#HTML presentation tools

There are many HTML presentation tools and they are all created for slightly different reasons. Here's an overview. Please let me know if I forgot any.

##CSSS

CSS-based SlideShow System

@calmyournerves
calmyournerves / building_git-annex_on_osx_mavericks.sh
Last active August 13, 2023 20:51
Building git-annex on OS X 10.9 Mavericks
# make sure the following is installed:
# - Xcode Command Line Tools (xcode-select --install)
# - OpenSSL from homebrew (brew install openssl && brew link openssl --force)
# dependencies and preparations
brew update
brew install git ossp-uuid md5sha1sum coreutils pcre gnutls libidn gsasl pkg-config libxml2
brew link libxml2 --force
brew tap darinmorrison/haskell
brew install darinmorrison/haskell/cabal-install