Skip to content

Instantly share code, notes, and snippets.

View danibram's full-sized avatar
🏠
Hack hack hack hack

Daniel Biedma danibram

🏠
Hack hack hack hack
View GitHub Profile
@danibram
danibram / fix_hosts.sh
Last active September 23, 2015 07:46
Fix hosts file from corruption
#!/bin/sh
# Solution found here (run with sudo):
# http://superuser.com/questions/866086/localhost-aliases-in-mac-os-x-mysteriously-stopped-working
tr '\015' '\012' < /etc/hosts > /tmp/hosts.$$
mv /etc/hosts /etc/hosts.bad
mv /tmp/hosts.$$ /etc/hosts
chown root:wheel /etc/hosts
chmod 644 /etc/hosts
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch