If you don't want to mess around with arcane incantations inside
xorg.conf, you can use the graphical
sudo apt-get install arandr arandr
If all your monitors are stacked in the same space, the space is not wide enough and you can't really move them, you need to switch to a proprietary driver. If it works with the open source driver for you, do not bother using another one.
amdcccle; if the binary is unavail…
If you have a PNG and want to know a pixel's alpha channel value, you can use Gimp:
Shiftkey while clicking the pixel
A window will appear, containing color information, including the alpha channel.
Freetile is a plugin for jQuery that enables the organization of webpage content in an efficient, dynamic and responsive layout. It can be applied to a container element and it will attempt to arrange it's children in a layout that makes optimal use of screen space, by "packing" them in a tight arrangement
The gem author Jonas Nicklas highlights in a Google Groups post that the release
spec/feature/...folder) and the
:typemetadata has been changed from
If you get a stacktrace complaining about
uninitialized constant MysqlCompat::MysqlRes a system library update might broke your gem.
Try fully removing and re-installing the gem:
gem uninstall mysql gem install mysql
Setup the mirror by following the steps described here.
If you want to enable OS upgrades using
do-release-upgrade make sure you include $release-proposed packages in the mirror script, e.g., precise-proposed. Additionally, you have to add
main/dist-upgrader-all to the $section in your script as
debmirror silently ignores some directories.
I attached our modified script to include current releases
Enable Ubuntu release upgrade from the local mirror ————————————–…
This may be configured for you by default.
Unlike in Gnome, there is no graphical tool to set a mouse cursor in Xfce. Run this on a terminal instead:
sudo update-alternatives --config x-cursor-theme
You need to sign out and back in for your changes to have an effect.
I am talking about development speed. When your application starts growing and you start adding gems, it starts to take really long to start up, be it the server, console or just running a single spec.
Zeus is smart, you don’t have to put it in your Gemfile or run it with Bundler, all you need to do is create a JSON config file via
zeus initand then start the server
After that, you’re ready to go, all you need to do is prefix every command with zeus. That means
zeus server, `rails console…
The very useful andand gem does not play very nice with Ruby's SimpleDelegator (or vice versa).
This following will not work:
class MyDecorator < SimpleDelegator def foo end end MyDecorator.new(Object.new).andand.foo
The reasons are a bit subtle, basically SimpleDelegator will "force" some methods to be delegated, so the
andand method is called on the wrapped object, not the delegator.
You can fix it like this:
class Decorator < SimpleDelegator def an...
This is super stupid:
This setting will apply to all files with that extension.
While you can set your own font in your terminal or other tools, it will not change the default "Monospace" font that some applications use.
To change that, edit
~/.fonts.conf and add settings for the "monospace" family. Here is how it looks on my machine now:
```monospace DejaVu Sans Mono
In Rails 2, when calling
instance_exec on a scope, the scope will fetch its records from the database.
This has been fixed in Rails 3+.
imgAreaSelect is a jQuery plugin for selecting a rectangular area of an image. It allows web developers to easily implement image cropping functionality, as well as other user interface features, such as photo notes (like those on Flickr).
As the title says: this jQuery plugin creates bar charts from HTML tables. It comes in some different flavors.
Check the examples page: http://alphagov.github.com/magna-charta/.
A technique to vastly reduce the number of join model records that need to be stored in the database.
The technique is only effective when there is a high redundancy in your data, e.g. combinations of the same 20 tags are used to label thousands of books.
The technique is also limited in that your join models cannot have additional logic, such as attributes or callbacks.
Ther has-many-with-set gem is an implementation of this technique.
Unfortunately, Compiz does not play nice with Xfce for me and Xfce itself does not offer a way to move a window to the next monitor.
Since I use this a lot in my daily work and there were no scripts working properly for me, I made one myself.
It's actually not bound to Xfce but should work on any window manager (haven't tried it, though).
If you don't yet have
xdotool, install it:
sudo apt-get install xdotool
If you don't yet have
wmctrl, install it:
sudo apt-get install wmctrl
Store the att…
Note: We have card with all CSS centering options. You probably want to head over there and get an overview over what techniques are available for your use case and browser requirements.
The classical scenario: There's a parent div element and you want to center some arbitrary child element vertically inside of it. Here's how you do it (also try this jsfiddle).
The children need to be block e…