Skip to content

Instantly share code, notes, and snippets.

View hersha.zsh-theme
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 Mar 8, 2012
Ruby: Simple TCP Server
View socket.rb
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