Skip to content

Instantly share code, notes, and snippets.

PROMPT='
$fg[cyan]%m: $fg[yellow]$(get_pwd)$(put_spacing)$fg[white]$(rvm_prompt_info)$(git_prompt_info)
$reset_color→ '
ZSH_THEME_GIT_PROMPT_PREFIX="[git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color"
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+"
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]"
@Hersha-Snips
Hersha-Snips / socket.rb
Created March 8, 2012 16:19
Ruby: Simple TCP Server
require 'socket' # Sockets are in standard library
server = TCPServer.new(1234)
begin
while connection = server.accept
while line = connection.gets
break if line =~ /quit/
puts line
connection.puts "Received!\n"
end