Today I needed to execute a ruby gem executable with sudo. But, surprisingly, bash would tell me command not found...
If you are exchanging files with a client via Dropbox you do not need to access the Web page every...
CSS (+ some Javascript) framework, implementing Google's material design for static web pages. Can be used for plain websites without...
Just dumping this in case somebody might need it. When you need a CSS value (a padding, margin, height etc...
My RubyMine (and it seems like many other Java GUI applications) crashes the Compiz window decorator almost every time on...
This is one possibility to do this. There are other and maybe even better ways to do this. Generate a key for your encrypted harddisk: dd if=/dev/random of=/home/bob/keyfile_sdb1...
Create a branch: svn copy https://dev.makandra.de/svn/filepanic/trunk https://dev.makandra.de/svn/filepanic/branches/$ticketnumber_shortdesc Don't just copy the folder into your working...
You might not know that Rails disables CSRF protection in tests. This means that if you accidentally forget to send...
We frequently use the handy Paperclip Gem to manage file attachments. If you need to move the files from local...
When using the screen tool you may be unable to start a screen session but instead encounter an error:
...returns Promise.reject("error") await foo() // throws "error" As an alternative you can use the behavior that exceptions thrown in promise callbacks will automatically be caught and converted to a rejected...
throw "No x given" } else return new Promise(function(resolve, reject) { ... }); } }); } This behavior is in all Promises/A+ compatible implementations like native promises, jQuery 3+ deferreds or Bluebird. Deferreds...
I had some problems with Git and the file spec/fixtures/ČeskýÁČĎÉĚÍŇÓŘŠŤÚŮÝŽáčďéěíňóřšťúůýž. After pulling the latest commits, it would show that...
...is functional as of Bash 4. This seems to result in a slightly differing behaviour when redirecting output in Ruby scripts. Instead of cmd &> file, prefer cmd > file...
If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...
...step above is that the console output of Cucumber will always be one step behind the Selenium window. This is because the sleep is blocking the completion of the step...
Install Ruby from the Ubuntu repository: sudo apt-get install ruby ruby-dev \ ruby is the meta package. If you...
The handy method has_select?(field, :selected => text) does not behave as expected with Cucumber 0.10.2, Capybara 0.4.1.2 and Selenium 0.2.2. It may not recognize a select field if the...
...value. If you don't have the possibility to upgrade these Gems, probably the best way to go is to distinguish the current Capybara driver: Then /^"([^"]*)" should be selected for...
This is a visualization of the files that will be generated by some useful rails generators. Invoke a generator from...
The new exception_notification has awesome options like :ignore_crawlers => true and :ignore_if => lambda {...
...}. These options should be helpful...
We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...
If you get this error (probably because you want to load some modules): # modprobe xt_comment FATAL: Could not load...
We're using Middleman for some static sites like our blog. Despite being very similar to Rails, Middleman does not...
Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...
When you have an element you want to hide, you can add a ng-show='isOpen' attribute to that element...