Skip to content

Instantly share code, notes, and snippets.

View smintz's full-sized avatar

Shahar Mintz smintz

  • Koh Phangan, Thailand
View GitHub Profile
@smintz
smintz / remote-typeahead.js
Created March 8, 2012 14:13 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
<script>
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
ev.stopPropagation();
#!/bin/bash
export LC_ALL=en_US.UTF-8
SCHEMA=${DEFAULT_SCHEMA:-$1}
TABLE=${DEFAULT_TABLE:-$2}
SOURCEINSTANCE=${DEFAULT_SOURCEINSTANCE:-'source'}
SOURCEUSER=${DEFAULT_SOURCEUSER:-'admin'}
SOURCEPORT=${DEFAULT_SOURCEPORT:-'5439'}
SOURCEDB=${DEFAULT_SOURCEDB:-'db'}
#!/bin/bash
SOURCEINSTANCE=${SOURCEINSTANCE:-''}
SOURCEUSER=${SOURCEUSER:-'admin'}
SOURCEPORT=${SOURCEPORT:-'5439'}
SOURCEDB=${SOURCEDB:-'db'}
SOURCESCHEMA=${SOURCESCHEMA:-'public'}
SCHEMA=${SCHEMA:-'public'}
echo "CREATE TABLE ${SCHEMA}.${TABLE} ("
psql -h ${SOURCEINSTANCE} -U ${SOURCEUSER} -p ${SOURCEPORT} ${SOURCEDB} -t -c "select (\"column\" || ' ' || type || ' ENCODE ' || encoding || ',' ) from pg_table_def where schemaname='$SCHEMA' and tablename = '$TABLE'" | sed 's/ENCODE none/ENCODE RAW/' | sed '$d' | sed '$ s/,$//'
echo ")"
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - The CipherCloud Gateway failed to start because system requirements were not satisfied.
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - Threshold not met for min.number.user.processes. expected:[16000] actual:[4096]!
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - Threshold not met for min.number.user.file.descriptors. expected:[32000] actual:[4096]!
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - Threshold not met for net.core.somaxconn. expected:[4096] actual:[128]!
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - Threshold not met for net.ipv4.conf.default.accept_redirects. expected:[0] actual:[1]!
[] 08/15/2016 09:20:12.597 [main - ] ERROR c.c.c.s.p.v.ASystemPropertiesValidator - Threshold not met for net.ipv4.conf.all.accept_redirects. expected:[0] actual:[1]!
[] 08/15/2016 09:20:1
#!/bin/sh
#
################################################
# Don't edit anything below this unless you
# know what your doing
################################################
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"