Ruby’s structs are one of my favorite data types in Ruby. They help you to keep some defined structure in the dynamic world of Ruby. Often, it makes sense to use them instead of hashes or arrays. Read-only structs take the idea a level further.
Things I learned while implementing version 1.0 of pws
After releasing version 0.9 of my cli password manager, I received friendly feedback and suggestions, which encouraged me to further improve it. Here are some of my experiences implementing pws 1.0:
pws: The ruby-powered command-line password manager
- stores your passwords in a file on your disk
- encrypts the file with a master password
- is designed for every-day-use
- is written in
234lines of understandable Ruby code… Read it! - is tested with 222 Cucumber steps
Three little tips for slimmer Rails migrations
Rails migrations are easy to understand and easy to write. However, you can save some unnecessary key strokes by applying these three tips :)
Small Ruby CLI Improvements (Part 3): Hirb vs. Unicode
Hirb: “A mini view framework for console/irb that’s easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu.” now supports unicode in two ways:
┌───────────────────────────────────────────┬───────────────────────────────────────────────┐
│ Support for unicode full-width characters │ Unicode table characters instead of +/- chars │
└───────────────────────────────────────────┴───────────────────────────────────────────────┘
Small Ruby CLI Improvements (Part 2): Wirb!
Many people use irb with wirble. I also did.
I’ve been quite happy with it, but sometimes I noted that some symbols were displayed as : without the symbol name (e.g. in method name arrays) and that the representation of regexes looked quite strange.
This is why I’ve looked at the wirble tokenizer, fixed some bugs, liked it, extended it and created Wirb. These are the improvements:
ripl: Why should you use an irb alternative?
What does it mean when the guy who blogged about irb’s details and wrote most of the successful irb gems (hirb, bond, boson) decides to implement his own irb alternative? There must be something wrong with irb!
IRB rockets and colors
Introducing the fancy_irb
gem:
- Use fancy colors! You can colorize the prompts, irb errors, stderr and stdout
- Output results as Ruby comments
- Enhance your output value using procs
Tutorial: Build your own password safe with Ruby!
There are many implementations of password managers/safes out there. But lots of them are black boxes, either because they are not open source, or because they have to much features and it gets complicated to understand the source (which is most likely not written in a happy programming language). You don’t know, what really happens with your passwords. So…
Do it yourself!
Do it with Ruby!
Do it in less than 250 lines ;)
irbtools / Release the power of irb!
Equipped with some tools discussed at the germany.rb 2010 user group meetup, I’ve played around with my ~/.irbrc
and put together a little meta gem for some useful irb tools (github)
Gem: clipboard
The clipboard gem allows you to access the clipboard on Liunx, MacOS and Windows.
Requirements: A Mini RubyGems plugin
The .gemspec
file of a gem allows to specify requirements for that gem – but usually you do not get to see them. These five lines patch RubyGems, so that gem
displays the requirements of a gem after it has been installed:
New features of Ruby Zucker version 2 and 3
The Zucker gem has gotten some new features. Installation is as easy as
gem install zucker
and
require 'zucker/all'
Introducing Ruby Zucker - a new syntactical sugar gem
Zucker is a collection of lightweight scripts (cubes) that make Ruby even more beautiful: rubyzucker.info
Troubleshooting an aegis-permission problem
In my current Rails project, I use the aegis gem for rights management. And I almost got mad, wondering, why it wouldn’t work..