gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

This card will show you a cool way to define a class using Struct.new. A common usecase for Structs are...

github.com

Barby is a great Ruby gem to generate barcodes of all different sorts. It includes support for QR codes via...

makandra dev

Crontabs are often unordered, especially when generated for an application where you usually group tasks by their domain/scope.

medium.freecodecamp.com

Collection of useful tools in the Chrome JavaScript console. Make the whole page editable This is not special to Chrome...

Building plain text emails with an .erb template doesn't allow you to indent code like you normally do in...

Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...

This card tries to summarize by example the different uses of heredoc. In Ruby << vs. <<- vs. <<~ In Rails strip_heredoc...

You can have a command repeatedly executed and the output displayed. This is useful e.g. for monitoring file system changes...

If you want to find the commits that touched a specific text in a file, use git log -S 'text...

Similar to our snippet that runs all Cucumber features matching a given string, the following will run all modified or...

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

The following will search for all .feature files containing a search term and run them using geordi. find features/ -name...

When testing Ruby code that prints something to the terminal, you can test that output. Since RSpec 3.0 there is...

jqueryui.com

UI sortable helps reordering items with drag 'n drop. It works quite fine. Proven configuration for sorting table rows

Many of our developers love to use the "awesome" window manager on Linux. However, RubyMine dialogs occasionally defocus while typing...

Create htpasswd entry and print to stdout: $ sudo apt install apache2-utils # Optional $ htpasswd -n $USERNAME New password:

The following sums up all connections (ESTABLISHED, TIME_WAIT, FIN_WAIT, etc.) and sorts it: netstat -n | awk ' $5 ~ /^[0...

techblog.netflix.com

You login to a Linux server with a performance issue: what do you check in the first minute? uptime

makandra dev
cyberciti.biz

Wondering which processes are placed in your swap you can use this bash oneliner: for file in /proc/*/status ; do...

makandra dev
github.com

Remove some old binaries (commands still exist in geordi) and mark others as deprecated Rewrite deploy command to support...

E-mails are usually encoded using Quoted Printable. Here is how to decode or encode such strings. You probably know...

makandra dev
serverfault.com

Logging tcpdump output all the time can create a huge amount of data. This can be both: too much data...

I had a very frequent cronjob that in rare cases could be relatively slow. To avoid multiple instances of this...