Skip to content

Instantly share code, notes, and snippets.

@ANemcov
ANemcov / migrate-elastic-search-indexes.sh
Created July 30, 2017 09:08 — forked from aterreno/migrate-elastic-search-indexes.sh
Script to migrate elastic search index mappings between one host and another one
#!/bin/bash
SOURCE_URI='http://10.251.76.43:9200'
DEST_URI='http://localhost:9200'
declare -a indexes=(gallery linklist module pageversion poll standardmodule styles video)
echo "Getting mappings from: $SOURCE_URI"
for index in ${indexes[@]}
@ANemcov
ANemcov / git_big_files.sh
Created December 27, 2015 18:50 — forked from skhatri/git_big_files.sh
remove big files from git history
#list top 10 big files
index_file=$(ls .git/objects/pack/pack-*.idx)
for x in $(git verify-pack -v $index_file| sort -k 3 -n | tail -10); do
git rev-list --objects --all | grep $x
done
#remove all war
git filter-branch -f --index-filter 'git rm -rf --cached --ignore-unmatch *.war' -- --all
@ANemcov
ANemcov / etc_monit_conf.d_local
Created December 19, 2015 09:23 — forked from mikluko/etc_monit_conf.d_local
Monit config to monitor and keep alive ppp connection
set mailserver localhost
set daemon 120 with start delay 240
set logfile syslog facility log_daemon
set httpd port 2812
allow localhost
set alert noreply@example.com
check host internet with address 80.254.111.254
if failed icmp type echo count 5 with timeout 30 seconds