Skip to content

Instantly share code, notes, and snippets.

View luddic's full-sized avatar

Ludovic Levesque luddic

View GitHub Profile
anonymous
anonymous / gist:765327
Created January 4, 2011 20:07
// Data from ES /images/image/1:
{"_index":"images","_type":"image","_id":"1", "_source" : {"tags":["beach","high fashion","beauty"]}}
// Getting _mapping
{"images":
{"image":
{"properties":
{"tags":{
"omit_term_freq_and_positions":true,
"index":"not_analyzed",
@funkatron
funkatron / chrometest.sh
Created February 9, 2011 15:20
To do testing on local HTML/JS apps in Chrome, I start it with this script to disable some security checks.
#!/bin/bash
# USAGE: /path/to/chrometest <localfile.html>
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--disable-web-security \
--allow-file-access-from-files \
--allow-file-access \
--log-level 3 \
$@
@kix
kix / pre-commit.sh
Created November 28, 2011 05:46
PHP CodeSniffer pre-commit hook for git
#!/bin/bash
# PHP CodeSniffer pre-commit hook for git
#
# @author Soenke Ruempler <soenke@ruempler.eu>
# @author Sebastian Kaspari <s.kaspari@googlemail.com>
#
# see the README
PHPCS_BIN=/usr/bin/phpcs
PHPCS_CODING_STANDARD=PEAR
anonymous
anonymous / elasticsearch.sh
Created January 6, 2013 07:11
/etc/default/elasticsearch on Debian
# Index settings:
# index.store.compress.tv: true
# index.store.compress.stored: true
# Based on Cassandra Java configuration:
# https://svn.apache.org/repos/asf/cassandra/trunk/conf/cassandra-env.sh
calculate_heap_sizes()
{
system_memory_in_mb=`free -m | awk '/Mem:/ {print $2}'`
system_cpu_cores=`egrep -c 'processor([[:space:]]+):.*' /proc/cpuinfo`
@jbfavre
jbfavre / gist:6811939
Last active March 8, 2020 19:24
Vertica monitoring draft. Which relevant informations can we get from v_monitor view ?

Vertica monitoring

Found into Vertica Ganglia monitoring package:

SQL statements

from verticalib.php

Events (SNMP Trap)

@josqu4red
josqu4red / haproxy_debian.sh
Last active December 25, 2015 13:09
Haproxy multi instance initscripts, FreeBSD & Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: haproxy
# Required-Start: $local_fs $network $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: fast and reliable load balancing reverse proxy
# Description: This file should be used to start and stop haproxy.
### END INIT INFO
PostgreSQL Data Types AWS DMS Data Types Redshift Data Types
INTEGER INT4 INT4
SMALLINT INT2 INT2
BIGINT INT8 INT8
NUMERIC (p,s) If precision is 39 or greater, then use STRING. If the scale is => 0 and =< 37 then: NUMERIC (p,s) If the scale is => 38 and =< 127 then: VARCHAR (Length)
DECIMAL(P,S) If precision is 39 or greater, then use STRING. If the scale is => 0 and =< 37 then: NUMERIC (p,s) If the scale is => 38 and =< 127 then: VARCHAR (Length)
REAL REAL4 FLOAT4
DOUBLE REAL8 FLOAT8
SMALLSERIAL INT2 INT2
SERIAL INT4 INT4