Permalink
Browse files

Initial import

  • Loading branch information...
0 parents commit 361a0f4ba04a4ab9c58bcb55f2f9578578361c0a @guillermo committed Mar 7, 2012
Showing with 112 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +4 −0 Gemfile
  3. +62 −0 README.md
  4. +1 −0 Rakefile
  5. +9 −0 bin/smile_me_please
  6. +5 −0 lib/smile_me_please.rb
  7. +3 −0 lib/smile_me_please/version.rb
  8. +24 −0 smile_me_please.gemspec
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in smile_me_please.gemspec
+gemspec
@@ -0,0 +1,62 @@
+# Smile Me Please
+
+Return random MAC Specific? UTF-8 smiles.
+Useful to add to your prompt, and be able to recognize different terminals easily.
+
+![Cool icons](https://img.skitch.com/20120307-tn1cqgp6m86fckchw5e5jism3i.png)
+
+
+## Usage
+
+You can call the command directly and will output a smily. If you pass the __-n__ it will not write the new line character.
+
+
+ $ smile_me_please
+ :-)
+ $
+
+
+ $ smile_me_please -n
+ :-) $
+
+**NOTE:** I don't know how to put utf-8 characters in README.md or if github is removing them.
+
+
+
+## Use cases
+
+Make every terminal different and easy to recognice by putting random faces on each on the prompt:
+
+In your .bash_profile, .profile, or whatever you prefer say
+
+ export PS1=`smile_me_please -n`$PS1
+
+Or a more complete example that uses **PROMPT_COMMAND**
+
+ export SMILE=`smile_me_please -n`
+ add_smile(){
+ export PS1="$SMILE $PS1"
+ }
+ PROMPT_COMMAND="add_smile"
+
+
+## Install
+
+ * Rubygems
+
+ gem install smile_me_please
+
+
+ * curl
+
+ curl -O https://github.com/guillermo/smile_me_please/blob/master/bin/smile_me_please
+ chmod +x smile_me_please
+
+
+## License
+
+ "THE BEER-WARE LICENSE" (Revision 42):
+ <guillermo@cientifico.net> wrote this file. As long as you retain this notice you
+ can do whatever you want with this stuff. If we meet some day, and you think
+ this stuff is worth it, you can buy me a beer in return Guillermo Álvarez
+
@@ -0,0 +1 @@
+require "bundler/gem_tasks"
@@ -0,0 +1,9 @@
+#!/usr/bin/env ruby
+# encoding: UTF-8
+
+
+EMOTICONS="😄 😊 😃 😉 😍 😘 😚 😳 😌 😁 😜 😝 😒 😏 😓 😔 😞 😖 😥 😰 😨 😣 😢 😭 😂 😲 😱 😠 😡 😪 😷 ".split(" ")
+
+
+print EMOTICONS[rand(EMOTICONS.size)], ARGV.include?("-n") ? ' ' : "\n"
+
@@ -0,0 +1,5 @@
+require "smile_me_please/version"
+
+module SmileMePlease
+ # Your code goes here...
+end
@@ -0,0 +1,3 @@
+module SmileMePlease
+ VERSION = "0.0.1"
+end
@@ -0,0 +1,24 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+require "smile_me_please/version"
+
+Gem::Specification.new do |s|
+ s.name = "smile_me_please"
+ s.version = SmileMePlease::VERSION
+ s.authors = ["Guillermo Álvarez"]
+ s.email = ["guillermo@cientifico.net"]
+ s.homepage = ""
+ s.summary = %q{Random smiles}
+ s.description = %q{Useful to put in the prompt of a shell.}
+
+ s.rubyforge_project = "smile_me_please"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ # specify any dependencies here; for example:
+ # s.add_development_dependency "rspec"
+ # s.add_runtime_dependency "rest-client"
+end

0 comments on commit 361a0f4

Please sign in to comment.