• This repository has been archived on 30/Mar/2020
  • Stars
    star
    739
  • Rank 61,358 (Top 2 %)
  • Language
    Ruby
  • License
    MIT License
  • Created over 16 years ago
  • Updated over 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Create, list, delete, and modify /etc/hosts entries with ease...

Ghost

A gem that allows you to create, list, and modify local hostnames with ease in Linux and other Unix-based operating systems (more to come)...

Requirements

Unix-based OS (for now)

Intended Usage

This gem is designed primarily for web developers who need to add and modify hostnames to their system for virtual hosts on their local/remote web server. However, it could be of use to other people who would otherwise modify their /etc/hosts file manually and flush the cache.

Command

$ sudo ghost add mydevsite.local
  [Adding] mydevsite.local -> 127.0.0.1

$ sudo ghost add staging-server.local 67.207.136.164
  [Adding] staging-server.local -> 67.207.136.164

$ ghost list
Listing 2 host(s):
  mydevsite.local      -> 127.0.0.1
  staging-server.local -> 67.207.136.164

$ sudo ghost delete mydevsite.local
  [Deleting] mydevsite.local

$ sudo ghost delete_matching test
  [Deleting] test2.local
  [Deleting] test.local

$ ghost list
Listing 1 host(s):
  staging-server.local -> 67.207.136.164

$ sudo ghost modify staging-server.local 64.233.167.99
  [Modifying] staging-server.local -> 64.233.167.99

$ ghost list
Listing 1 host(s):
  staging-server.local -> 64.233.167.99

$ ghost export > some_file

$ ghost empty
  [Emptying] Done.

$ ghost list
Listing 0 host(s):

$ ghost import some_file
  [Adding] staging-server.local -> 64.233.167.99

$ ghost list
Listing 1 host(s):
  staging-server.local -> 64.233.167.99

With RVM, you need to add rvmsudo before the command:

$ rvmsudo ghost add mydevsite.local
  [Adding] mydevsite.local -> 127.0.0.1

Library

There is also a library that can be used in Ruby scripts. The ghost command is a wrapper for the library. View the source of bin/ghost to see how to use the library.

Installation

gem install ghost

Using sudo may be necessary in some circumstances, depending on your setup (for example, using the stock Ruby that comes on OS X).

Contributors

A list of contributors can be found here..

Legal Stuff

Copyright (c) 2008-2013 Bodaniel Jeanes

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

dotfiles

๐Ÿ 
Shell
70
star
2

grabshot

Mini API to create screenshots of websites and call back with the image data.
Ruby
53
star
3

culture

On company culture, values, and ethos โ€” a collaborative thought experiment.
33
star
4

noober

Ruby
30
star
5

ruby-string-match-scorer

Quicksilver-like string match scoring
Ruby
26
star
6

tab_fu

Plug-in to manage tabbed interfaces with ease in Ruby on Rails (or really any menu navigation)
Ruby
25
star
7

tv-renamer

Ruby script to rename downloaded TV Shows to custom format. Like @dbr/tvdb_api/tvnamer.py but using @maddox/tvdb
Ruby
19
star
8

go-lifx

Go implementation of the LIFX bulb protocol, including a command line client, a client library, and a debug-oriented traffic snooper
Go
18
star
9

indexer-sync

NOT MAINTAINED - Just use Prowlarr ๐Ÿšง
Rust
15
star
10

tmbundle-collection

Collection of TextMate bundles hosted on GitHub to get
14
star
11

sinatra-twilio

Easily create Twilio apps with Sinatra
Ruby
12
star
12

twibblr

A Rails Engine that adds blogging + twitter + github + flickr to any existing rails site
Ruby
9
star
13

optparse-subcommand

Add popular subcommand-style option parsing to Ruby's stdlib OptionParser class
Ruby
8
star
14

authorized_keys

Library for managing authorized_keys files.
Ruby
8
star
15

rb-utorrent

Ruby Library to talk to the uTorrent WebUI API
Ruby
7
star
16

go-edn

A very much incomplete EDN parser for Go
Go
7
star
17

hostjour

Ghost for Bonjour
Ruby
7
star
18

inb345demo-rails

Demo showing how to work with iPhone and Rails and comparing different transfer mechanisms: xml, html, json, plist. Also gzipping each one.
Ruby
7
star
19

modbus-mqtt

A bridge between Modbus (TCP, RTU, Sungrow WiNet-S) and MQTT
Rust
6
star
20

TVRenamer

MacRuby GUI version of my tv-renamer ruby script...
Ruby
6
star
21

gojure

A LISP written in Go, with some design cues from Clojure โ€”ย purely a learning toy
Go
6
star
22

juggernaut-objc

Juggernaut client in Objective-C for using on the iPhone
Objective-C
6
star
23

itorrent-iphone

Native iPhone app to access a remote uTorrent instance using it's WebUI API
Objective-C
6
star
24

hillegass

Cocoa Programming For Mac OS X Exercises (in Obj-C / MacRuby)
Ruby
5
star
25

find_by_like

Rails plugin for fuzzy finding
Ruby
5
star
26

dante-vpn-docker

5
star
27

towerdefense

A Warcraft-style tower defense multiplayer flash game for ITB230 at QUT
Ruby
5
star
28

dearqut

http://dearqut.com
Ruby
4
star
29

moovy

A web app for managing what disks all my movies are on. Interfaces with imdb to help choose a movie to watch...
Ruby
4
star
30

fi-sync-hooks

A set of git hooks for bi-directionally syncing Github:FI and another remote (e.g. Gitosis)
Ruby
4
star
31

google-sets

Ruby API/wrapper for Google Sets
Ruby
4
star
32

woodford

Small management app for running the Internet Cafe at the Woodford Folk Festival
Ruby
4
star
33

enlive

HTML templating library that lets you create composable pure functions for your views based on applying modifications to HTML templates using CSS selectors.
Ruby
3
star
34

livedate

Rack middleware for Chronic
Ruby
3
star
35

hk-deploy

A plugin to the fast Heroku CLI hk for deploying via the Heroku Build API
Go
3
star
36

project-euler

My solutions to project euler problems
Ruby
3
star
37

syntrax

Generate syntax/railroad diagrams from grammar definitions (W3C-style EBNF, initially)
Ruby
3
star
38

make_abstract

Ruby module that upon requirement will allow any object to become "abstract" by calling a single method
Ruby
3
star
39

nss_zerotier

A NSS module to allow host lookup from joined ZeroTier networks
Rust
3
star
40

takeflight

A little web app to show a flight status board for Pivotal Tracker projects (and, eventually, maybe others).
Clojure
3
star
41

caslj

A Clojure CAS server implemented with Compojure. Pronounced "Castle"
Clojure
3
star
42

tipi

A bandwidth-quota monitor for TPG users that sits in your OS X menubar.
Ruby
3
star
43

matrimony

Ruby
2
star
44

ey_hudson_proxy

Small proxy to deploy as the default app on an EY AppCloud instance (because something needs to be deployed!)
Ruby
2
star
45

ha-config

My Home Assistant config
JavaScript
2
star
46

myheartlist

Ruby
2
star
47

harvester

Ruby
2
star
48

uni

Uni work
ASP
2
star
49

umbrella

Deflect torrents
Ruby
2
star
50

faetr

guess.
Ruby
2
star
51

ale-adjust

Given an Avid ALE file, it will adjust the start, end, and duration times a given amount
Ruby
2
star
52

epubber

Convert textile books to ePub file
Ruby
2
star
53

itorrent-webui

Another iTorrent. This time an iPhone WebUI version (done RIGHT!)
JavaScript
2
star
54

filtered-backbone-collections

Create filtered collections bound to existing collections.
CoffeeScript
2
star
55

buzzer

Ruby
2
star
56

wherewasi-iphone

Objective-C
2
star
57

colemak

Colemak keyboard layout
2
star
58

plex_sync

Goal (still early WIP): Elixir application to sync watch status between all Plex servers you have access to automatically and on an on-going basis
Elixir
2
star
59

website-design

Styleguide for my website bjeanes.com
Ruby
1
star
60

heroku-buildpack-buildkite-agent

1
star
61

babushka-deps

My babushka deps
Ruby
1
star
62

fields_for_invalid_html

Ruby
1
star
63

backbone-subsettable

Please see https://github.com/bjeanes/filtered-backbone-collections instead
JavaScript
1
star
64

viztrello

Traverses Trello cards and the links between them to create a directed graph of relationships between cards.
Clojure
1
star
65

build-each

A proxy for GitHub push events that replays the push for each commit, changing the effective HEAD
Ruby
1
star
66

ultraviolet-tools

Some command line utilities for turning textmate bundles into themes and syntaxes for UltraViolet, and placing them in a custom directory
1
star