Skip to content

Instantly share code, notes, and snippets.

@ValentineK
ValentineK / download-url-to-file.rb
Created November 17, 2015 01:23 — forked from johnjohndoe/download-url-to-file.rb
Ruby script to download a number of files from individual URLs via HTTP/HTTPS/FTP specified in an external file.
#!/usr/bin/env ruby
#
# Ruby script to download a number of files
# from individual URLs via HTTP/HTTPS/FTP
# specified in an external file.
#
# Author: Tobias Preuss
# Revision: 2013-04-18 16:26 +0100 UTC
# License: Creative Commons Attribution-ShareAlike 3.0 Unported
@ValentineK
ValentineK / manage-etc-hosts.sh
Created September 4, 2018 07:09 — forked from irazasyed/manage-etc-hosts.sh
Bash Script to Manage /etc/hosts file for adding/removing hostnames.
#!/usr/bin/env bash
# Path to your hosts file
hostsFile="/etc/hosts"
# Default IP address for host
ip="${3:-127.0.0.1}"
# Hostname to add/remove.
hostname="$2"